Instead of trying to memorize every interval out of context, a more useful ear training goal is the "memorization" of each scale degree in relation to the tonic (Movable-do solfege). Each degree will eventually produce a certain sensation. [The context of a C major scale is used in this post when examples are given]
Some degrees are more stable than others (1, 3 and 5; 1 being the most stable) and some degrees are more unstable (2, 4, 6 and 7; 7 being the most unstable). The unstable tones produce a certain desire to step into another close stable degree. It's like 7 wants to be followed by 1; 2 wants to be followed by 1 or 3; etc...
My question is: How does that work if there is an underlying harmony?
If we play some melody on our solo instrument alone, the feeling of tendency tones and stable tones is easily heard. However, the degrees of the same melody will produce a different sensation over a different set of chords. A "C" would become less stable when played over an F chord and a "B" would be more stable if played over an Em chord.
It seems that solfege books don't introduce the "problem" of existing background chords. It seems to me that there is a "main center of gravity" (the tonality) and "movable satellite centers of gravity" (the chords). So, when you finish exercises of internalizing degrees and you are able to audiate simple melodies, you are an expert of doing so over a C chord, but when the harmony changes to an F chord, everything becomes much more difficult (the unstable "F" doesn't have such a strong desire to be followed by an "E", for example).
Would the recommendation still be to hear everything in relation to the tonic? It's not very natural to keep the tonic in mind while the harmony changes and it somewhat ruins the experience of hearing the music.