Your question I believe is as follows: Is the angel that appears to Hagar the Lord or just a messenger (meaning that his message is not necessarily divine)? If it is the former, how can God makes a promise regarding Ishmael that so closely mirrors His promise to Abram regarding Isaac.
Well first of all, regardless of whether this was a messenger (whatever you mean by that) or the Lord itself the bible clearly regarded this a genuine revelation, or else the bible wouldn't record it. I ask you why would the bible record a prophecy that it believes to never have come true? The fact that the bible considers it significant and important enough to record it reveals that the biblical authors considered it a genuine divine revelation. Indeed the bible itself alludes to the fruitfulness of Ishmael and to the fact that his children multiplied in numbers,
These are the sons of Ishmael and these are their names, by their
villages and by their encampments, twelve princes according to their
tribes. Gen. 25:16 (ESV)
The number twelve is quite significant in the bible as the tribes of Israel themselves were said to be twelve. So here the bible is most likely hinting that the tribes of Ishmael numbered twelve just like the tribes of Israel which were said to be numerous "as the sand of the sea and as the heavenly stars". So you see according to the bible this prophecy indeed came true.
As for your other question, how can god extend to both of Abram's children the same blessing? Well it is not exactly like that. God clearly tells Abram in Gen. 21:12 "through Isaac that your offspring[b] will be reckoned". This clearly indicates the superiority of Isaac's offspring. But even though the bible distinguishes between Isaac and Ishmael it goes on to bless Ishmael telling Abram, "I will make the son of the slave into a nation also, because he is your offspring.” So you see blessing both of Abraham's children with many children is not necessarily seen as a contradiction as long as one is more distinguished than the other.
Hope you find this helpful.
Genesis 16:10-12
10 The angel of the LORD also said to her, "I will so greatly multiply your descendants that they cannot be numbered for multitude." 11 And the angel of the LORD said to her, "Behold, you are with child, and shall bear a son; you shall call his name Ishmael; because the LORD has given heed to your affliction. 12 He shall be a wild ass of a man, his hand against every man and every man's hand against him; and he shall dwell over against all his kinsmen." – barlop Jan 31 '19 at 16:46