I am by no means an expert in these things as I rarely play otb chess and chess.com controls what you can and can't do on the site but I think your opponent was wrong and you could have had 2 queens in this position
Restriction on Pawn Promotion to Queen case two pawn same row

Your friend bamboozled you. It must have been hard for your friend to keep a straight face. There is no such rule and as a matter of fact, both of those pawns could have been promoted
to queens.
Ok I was playing white and I had one pawn at a7 and other at a6. My opponent didn't let me promote the pawn to Queen stating that when two pawn are in the same row then the pawn doesnt get promoted. Is this correct and if yes then what happens to pawn which reaches at a8? Does that become useless?