I know very little theory, but I've been playing jazz for almost 50 years, and I know hundreds of melodies along with enough of their harmonies to improvise and accompany other players. Many people pick up tunes from the radio or hymns at church, even if they don't play an instrument.
I think a helpful tip for ear training is that you can do it without an instrument, just by hearing stuff (tunes, rhythms, accompanying parts) and trying to sing along. For beginners, this avoids the awkwardness of the instrument and its technique getting in the way.
If you develop your ear and learn your way around your instrument, then you can learn to play along by ear and then just write down what you're doing.
Well, unless, you are studying here in Hungary, for example, where it starts pretty much right away... (though it is a separate class).