Whether she's seeing him or in a relationship with him - it's incredibly crass and classless to talk about a guy like that in front of other people. I know girls watch Sex and the City and therefore talking about sex, their penis size etc is all ok - and maybe it is to 1-3 other friends, actually talking about it for the most part as a legit problem, maybe there being a laugh or two to make light of it. But with a straight guy (s) present at the pub, and bringing it up to just take the piss out of him is totally classless - the guy might very well know or meet up with these friends and you. I would disown that ****.
I agree with you - he probably didn't get it up because she's an eyesore. He has to pile down 100 shots of vodka before she starts becoming attractive and by then the penis won't work anyway. If you have some class and maturity, you keep that stuff to yourself and maybe some close friends to talk about it constructively.
If you can't get it up in your teens, twenties - 99.9% of the time it will be because you don't find the girl attractive, or there's alcohol involved - or both - if you find the girl doable with alcohol, it won't happen - that's happened to me once - if it's a really smoking hot girl, alcohol or no, it's never failed for me. But stress can also cause it in which case she could have been laughing about a legit medical problem.