This is immensely helpful. You say the following and I want to make sure I understand this concept.
"So, the notes of the D major scale, or B minor (relative minor of D major) will work for all of it except the E major chord. At that point, you'd have to alter the scale note G to G# to align with the E major chord."
I understand there are two approaches to understanding modes. Either the parallel approach or the derivative approach. The E Dorian scale can be derived (derivative approach) from the D Ionian scale.
Now, with this knowledge, I can play the notes of the D major (Ionian) scale and I am still playing in the E Dorian scale, though resolving to a different root.
Now also, b minor is the relative minor of the D Ionian scale. Since I know the b minor penatonic patterns, I can apply this and play that scale up and down the fretboard and I am still playing notes that are also in the E Dorian, again resolving to a different root.
Basically, I'm trying to make a big problem small and connect what I already know to this new problem. If I'm understanding this right, it means I don't have to learn a new scale for E Dorian, per se. Instead, I can connect the E Dorian to the D major and b minor and play those scales as I already know them.
Hopefully I'm making sense.