Quirk of the language. पास is only used to denote possession for non human things. In most other instances, it means - near/nearby.
मेरे पास दो कुत्ते हैं - I have two dogs.
मेरे दो बेटे = not a complete sentence but only a phrase and translates to - my two sons. This is consistent with what you have learned.
But now we add हैं to that phrase and it becomes a sentence.
मेरे दो बेटे हैं। - My two sons are - or in proper English - I have two sons.
Technically के पास is used for anything non-human that is portable. For example you should not say मेरे पास एक घर है। However, almost all native speakers use के पास for everything including humans, so the above sentence would seem incomplete. “My two sons are.” आपके बेटे क्या हैं would be the response.
Sorry. I completely disagree with what you said. We use पास to indicate possession of any non human thing. Portability is hardly a concern.
I'm a native Hindi speaker and if I had to say - I own/have a house - I would definitely say मेरे पास एक घर है।
There may be other, more formal ways to say it but using पास is the most common way.
"के पास ke paas is only used when you 'have’ small items or objects. के पास ke paas is not used for relatives (ie saying 'I have two brothers’ is different) nor for parts of the body... don’t forget that we don’t use के पास ke paas for relatives, 'really big things’ like houses, or body parts!" - Learning-Hindi.com lesson #92
Please reference my comment above. I made mention that this is a technicality, but "almost all native speakers use के पास for everything."