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.