ok first of all the notes in a triad are a 3rd apart. so g major is G B D.
modes are simply keys that have a different starting note, i'll use your G major since you're so comfortable with it...
G A B C D E F# = Ionian
A B C D E F# G = Dorian (starts on the 2nd scale degree)
B C D E F# G A = Phrygian (starts on the 3rd scale degree)
etc. etc.
if you're playing as you said you would not be in a different mode, you'd still be wherever you were before, G. Yes mixolydian has it's own scale however i would not say you were using mixolydian unless that D chord was a D13. the progression you wrote up there is perfectly tonal: Am(ii), D(V), G(I) and Em(vi)...a very common progression, does not make it modal unless something else unique was happening. something like a bass ostinato or pedal, emphasizing a particular tonal center.