You've got it pretty much right, but I feel you may be looking at it the wrong way.
You're examples were correct notewise (if you meant Dorian when you said 'minor', minor is usually understood to mean Aeolian). Take your example with A.
A B C# D E F# G#
A major, B dorian, and E mixolydian contain exactly the same notes, the ones above. The other such modes are C# phyrigian, D Lydian, F# Aeolian, and G# Locrian. The difference is where you're center is, which note you "call home". You could say E mixolydian is the same as A major except you are centered at E instead of A. When playing the scale sequentially you would play the same notes just starting and stopping at E instead of A. The resulting flat 7 (D natural) is what gives it the mixolydian instead of major sound.
A good understanding of the relationship between modes will take you further than 'learning' all of them by memorization. Of course, it still takes some of that rote practice to become comfortable with playing it all over the fretboard.
As for which modes to play when, you're description is correct in the most straightforward situations. You can play A major scale over a song in A major. You could play the others listed as well, particularly if you are over a matching chord (ie B dorian over Bm). Just remember that the tonal center is important too. You should not repeatedly play B minor over the A progression, for example. You need to keep in mind the notes in the scale and the tonal center.
Hope that helped and didnt confuse, I know it can be a lot to take in at once. Play with it and those weird words will become something you can feel, then its easy to remember.