If I play a dominant B7 chord on the guitar in open position notes B D# A B F# and release the F# at the top to give me a E note as well, does the chord stay a dominant B7 or does it change? My teacher once told me that it changes but I can't remember because it was so long ago.
Should the bass note resolve to the tonic (B followed by E in the mentioned case) and the third (D# followed by E), the chord sounds essentially the same. The added notes are just non-chord tones. Classically, the E added sounds as if it is an "anticipation" of the next chord. It's dissonant but the chord changes under the E to be an E chord. (If I read the chords correctly.)
Adding an E on top of the B7 chord while keeping the D# (1st fret D string) is usually not done because the b9 interval between the D# and the E is normally perceived as dissonant in a bad way. What you can do is leave out the D# (by muting the D string) and add the E on top, which would give you a B7sus4 sound (
X 2 X 2 0 0). Note that in this case you're losing the 5 (F#), but that's not a big problem.
If you want the 5 as well (and also add the 9th), you can barre your first finger over the second fret:
X 2 2 2 2 2
This is a B9sus4 chord, which can also be written as F#m7/B or A6/B. And, finally, if you want to add some more color you can replace the 5th by the 13th and play
X 2 2 2 2 4
which is a B13sus4 chord, also written as Amaj7/B.
It is still dominant.
The 11th of the V is the tonic and V7 over tonic pedals are common in classical music; you could even play it 0-2-1-2-0-0. The tritone between the 3rd and 7th chord tones really emphasize the dominant sound so you can really add any tones to it you want. Of course as soon as you remove that 7th of the V, it's going to sound more like the tonic with added tones.
It keeps it's function, but it can be weakened or obscured. The 'engine' notes in a dominant 7th are the root, 3rd and 7th. The 3rd is the leading note of the key which our dom7 is the dominant OF. In G7, we're talking about a B, aiming to resolve to the C in C major.
If we add the 11th to the dom 7, we've pre-resolved that B to C resolution. That part of the dominant 7th 'engine' has been cancelled out. We've taken a step away from it being a functional chord to just being a cluster of notes.
This is why the dominant 11th chord is rarely used in functional harmony.
(The #11 is OK, and quite common. Also note that when you see the chord symbol B11, it's quite likely to actually mean B7(sus4), B9(sus4) or A/B. Yes, I know this isn't what it SHOULD mean, but such useage is well-established so we must be aware of it.)