Agreed. That's "perfect pitch", not "playing by ear", though being able to identify individual pitches simply by hearing them can certainly help one to learn and remember tunes by sound alone.That's what I would call perfect pitch, and it's pretty rare. I personally don't know anyone with perfect pitch.
I always considered playing by ear to mean that you hear a note and can say - that is a C.
I know a few folks with perfect pitch, and it comes in many variations. A few people can hear any pitch and know what it is. Many more can recognize particular pitches, e.g., a violinist may "remember" the sounds of the open G, D, A, and E strings, but not be able to identify an F# (e.g.), except by mentally comparing it with the sounds of those open strings. And some can tell the difference between A440 and A438, while others will simply identify both -- and in fact anything less than halfway to the next note -- as "A".
To me, playing from memory is not the same as "playing by ear". This is particularly true if what you've memorized is an image of the written music, but also if you're remembering the physical movement of your fingers without "hearing" the music.
To me playing by ear means playing without score in front of you. This can be accomplished by feats of memory (i.e. learning the score) or by picking the tune up and learning to play it that way.
To me, "playing by ear" is the ability to connect the sound -- either real or "in your head" -- of the music with the muscular movements which duplicate that sound. Its most often discussed form is the ability to learn music, whether immediately or slowly, simply by listening to it, without the intervention of written notation (or of someone explicitly naming each note). Learn it by listening to it a hundred times? Make mistakes that don't sound right, and figure out what buttons to push to get the right sound? Those are playing by ear, just as much as being able to hear a tune once and then play it back note for note. (That latter is something my fingers are sometimes capable of, without my being aware in advance of the names of the notes that I'll be playing.) It is possible, though, to learn a piece from printed music, yet subsequently remember how to play it by remembering what it sounds like. That latter is still "playing by ear", in my view.
Ask me the key of a new tune I'm hearing, and I'll have no idea. But a good third of the time my fingers will find it first try, if I don't try to direct them, whether it be D, Bb. C minor, or (les reliably) one of those klezmer or Swedish scales with jumps of a minor third (e.g., A-Bb-C#-d-...). I guess that's "by ear".
But after years of playing by ear the most I can mange in terms of recognising note values is a reasonable guess (right 75% of the time) as to whether a new tune heard in a session is in G, D or C.
I suppose not. None of my grandnieces and nephews plays the concertina, though a brother in law and his son both play PA.
...let's not talk about the relative minors!