Is it considered against standard Buddhist doctrine to meditate with music?
I am aware of some studies that suggest that "noise" can be an aid to concentration - i.e. people who doodle at meetings tend to be more attentive, people who chew gum in class tend to remember more, and people who listen to classical music write more fluently.  In preliminary stages of meditation, you might even find it easier to gather your mind when there is an outside stimulus.  Guided mediation is just one example of this.  That being said, all four of those activities refer to modes of thought that are distinctly different from what you are aiming at in deeper meditation.  When sitting in a Buddhist sense (i.e. for jhana meditation, vipassana, koan practice, etc.), you need to work towards developing applied and sustained thought in a way that is as free from distraction as possible i.e. "Quite secluded from sense pleasures, secluded from unwholesome states of mind..."  MN 4.  This also infers that the influence of the five hinderances needs to be limited.  It goes without saying that listening to music is fairly antithetical to that end.

Regarding your experience that you hear music more readily when sitting - that's a fairly common occurrence.  You are just becoming aware of another level of your mind that was previously obscured by grosser thought (for what it's worth, I have the same experience when I'm backpacking or doing any other activity that isn't thought-intensive).  You do need to get beyond that state, however.  As you apply concentration, you will eventually push past that boundary and into deeper, more silent layers of the mind.