Wa Alaykum Assalam and thank you for your question.
To begin with, the Prophet (peace be upon him) was adopted by his uncle, which is the natural thing to be done if a child becomes an orphan.
Islam allows adoption but doesn’t allow naming the child according to adopted father’s name when the real father’s name is known.
The Prophet (peace be upon him) adopted Zaid, who was initially named Zaid ibn Muhammad then according to Allah’s command, he was named according to his real father’s name, Zaib ibn Al-Haritha; Allah says what means:
{Call them (adopted sons) by (the names of) their fathers: that is more just with Allah. But if you know not their father’s (names, call them) your brothers in faith and Mawalikum (your freed slaves). And there is no sin on you concerning that in which you made a mistake , except in regard to what your hearts deliberately intend. And Allah is Ever Oft-Forgiving, Most Merciful.} (Al-Ahzab, 33:5)
Unless the child suckled from the adopted mother then all rules of Islam apply on him/her when grown-up:
1. The child may marry one of the daughters/sons of the adopted parents.
2. If a boy, the rules of hijab will apply on all the female members in the family since he is a non-mahram.
3. If a girl, she must adopt the hijab in front of all male members of the family.
etc…
The main issue is to for the child to know when grown up that he is adopted. Because Islam cherishes family relations and Islamic law protects the family tree, then it should be clear who is who in the family.
This is to reveal the truth and to understand what is allowed and what is not. Otherwise, adoption is highly recommended in Islam.
I hope this helps answer your question.
Salam and please keep in touch.