But I get where your friend is coming from. When I hear something off pitch, for whatever reason, it's just distracting and pure cacophony.
However, this skill isn't due to hearing a precise gap between the two notes, but listening to the beating of the overtones of the notes. It's a very different skill than what you learn in school to identify intervals.
Also, professional string players can often tune equal tempered fifths (~2 cents flat of a pure fifth) precisely on their instruments.
When we talk about perfect pitch we're usually assuming 12-tet tuned to A440 but you correctly homed in on the "problem" with perfect pitch. Is that C a little sharp, or did they just tune to A446 for some reason? Just intonation, microtonal scales, there are a lot of notes out there. How do you know they're "wrong" and not just trying to play the note that sounds out of tune to your ear. "Perfect" has to be established against some intention, we just usually assume 12-tet A440.
Anyway the ability is at least somewhat a matter of practice and training, so you can develop it against any consistent reference, regardless of the tuning or intonation system.
More generally, I think the answer is “pretty high-resolution”. Lots of people can definitely hear the difference between equal and just temperament.
IIRC most people’s hearing is accurate to around 10 cents (a tenth of a semitone). Wikipedia suggests musicians generally tune to within 12 cents, and the “just noticeable difference” is 5-6.
You’d only need absolute accuracy better than 50 cents to be able to correctly name a note on the piano. I’d guess most people with perfect pitch are more accurate than that, likely around the same ~10 cents mark.
Anecdotally, I have a musician friend with perfect pitch who finds it annoying sometime, as they find it unsettling when music is tuned slightly sharp or flat; so I think their sensitivity is much finer than a semitone.
People with absolute pitch can nonetheless distinguish pitch with better than semitone accuracy. This is why it's often a hindrance, because if an ensemble is tuned to a slightly different reference, it is quite noticeable to them.
In this video you can see an example of how it is: https://www.youtube.com/watch?v=gF4onowI1xw
[1]: https://pt-m-wikipedia-org.translate.goog/wiki/Harpa_Crist%C...
A cute (translated) comment from the video: “To sing with this guitarist is easy! Just praise the Lord and he does the rest!”
When I went to my parent's church, the organist would spot me and then immediately transpose the organ down a half step. Nobody noticed in the entire room except for me -- I couldn't sing any hymns because the notes didn't match what was on the sheet. It was his private prank just between us two, and he knew that I was the only other person in the room who knew what he had done to me.