All we do know for certain is that Ishmael was Abraham's only son as Isaac was born about 13 years later. So when Abraham was told to offer up his only son only Ishmael qualifies as he was first born. It couldn't have been Isaac as Isaac had not been born yet so Isaac was never Abraham's only son.
"By faith Abraham, when he was tested,
offered up Isaac, and he who had received the promises was ready to offer up
his only son ..." (
Hebrews 11:17, R.S.V.)
According to the Quran Moses was first told to sacrifice His son. Then AFTER the sacrifice He was given the glad tidings of the soon to be born Isaac.
Further scrutiny requires that we quote the full passage in surah 37:
ISHMAEL spoken of here by default because further down Abraham is told that Isaac will be born to Him. The first son isn't named but it wasn't Isaac so it had to be Ishmael.
ABRAHAM ASKS GOD FOR A SON then is asked to sacrifice him
99. He said: "I will go to my Lord! He will surely guide me!
100. "O my Lord! Grant me a righteous (son)!"
101. So We gave him the good news of a forbearing son.
102. Then, when (the son) reached (the age of) (serious) work with him, he said: "O my son! I have seen in a vision that I offer thee in sacrifice: now see what is thy view!" (The son) said: "O my father! Do as thou art commanded: thou will find me, if Allah so wills, one of the steadfast!"
103. So when they had both submitted (to Allah), and he had laid him prostrate on his forehead (for sacrifice),
God Rewards Abraham's sacrifice
104. We called out to him "O Abraham! ...
105. "Thou hast already fulfilled the vision!" - thus indeed do We reward those who do right.
106. For this was a clear trial-
107. And We ransomed him with a momentous sacrifice:
108. And We left for him among generations (to come) in later times:
109. "Peace and salutation to Abraham!"
110. Thus indeed do We reward those who do right.
111. For he was one of Our believing Servants.
GOD GIVES ABRAHAM ISAAC
112. And We gave him the good news of Isaac - a prophet,- one of the Righteous.
113. We blessed him and Isaac: but of their progeny are (some) that do right, and (some) that obviously do wrong, to themselves.
You see then that Abraham offered His only son BEFORE Isaac was born and that is clearly Ishmael. The Quran also clears up the contradiction in the Bible verse where Isaac is mentioned but 'only son' is mentioned too and it is not possible that Abraham sacrificed Isaac as he hadnt been born yet and Isaac was never Abraham's first or only son at any time. Ishmael was.