It doesn't specify *when* the elementalist can use their ability. Could you, for instance, use it after you encounter a creature but before you roll your die?
Elementalist Ability Speed?
I think we have something similar to Druid.
Druid
Q1
: If the Druid draws an Event which affects alignment, can he immediately alter his alignment to gain benefit from the card?
A
: Yes.
I think it's the same thing with other types of cards, like Enemies.
I see a parallelism between these 2 characters.
So, your
Q
is: "If the Elementalist draws an Enemy which attack is the opposite of the elemental marker, can he immediately alter his elemental marker to gain advantage?"
My
A
is: Yes