In short yes this is likely the source
I usually recommend a charcoal water filter , unfortunately they do not last very long
second increase temp of electric tank just above 140 ( this will kill the bacteria but wont resolve the sulfur gas )
third replacing the magnesium anode rod with zinc , this will decrease the excess electrons released which is used as fuel for the bacteria. This will help greatly but not completely
Removal of the rods completely is a last resort , this is not recommended because it will greatly decrease you tanks life