
sich erwehren
to fend off
To actively defend oneself against an attack, a danger, or harassment.
Der Wanderer musste sich eines angreifenden Hundes erwehren.
The hiker had to fend off an attacking dog.
to fend off / resist
Loading your saved state.

to fend off
To actively defend oneself against an attack, a danger, or harassment.
Der Wanderer musste sich eines angreifenden Hundes erwehren.
The hiker had to fend off an attacking dog.

to be unable to resist
To be unable to resist a feeling, thought, or impression; to involuntarily feel or have to do something.
Ich konnte mich des Eindrucks nicht erwehren, dass er nicht die Wahrheit sagte.
I couldn't resist the impression that he wasn't telling the truth.
'Erwehren' (to fend off / resist) is always reflexive, so it is always used with a reflexive pronoun (mich, dich, sich, uns, euch, sich) in the accusative. Without this pronoun, the sentence is incomplete.
Wir mussten uns gegen die vielen Mücken erwehren.
We had to fend off the many mosquitoes.
This verb requires an object in the genitive. This is rare in modern German and is a sign of elevated style. One says 'sich einer Sache erwehren' (to fend something off) or 'sich einer Person erwehren' (to fend off a person).
Die Politikerin erwehrte sich der kritischen Fragen der Journalisten.
The politician fended off the journalists' critical questions.
The verb 'sich erwehren' (to fend off / resist) belongs to elevated written language. It is only rarely used in everyday colloquial speech.
Er versuchte, sich des Schlafes zu erwehren, um den Film zu Ende zu sehen.
He tried to resist sleep in order to finish watching the film.
The second meaning is used almost exclusively in the fixed expression 'sich einer Sache nicht erwehren können' (to be unable to resist something). The thing is always a feeling, a thought, or an impression.
Sie konnte sich eines Lächelns nicht erwehren, als sie das alte Foto sah.
She couldn't resist a smile when she saw the old photo.
to resist
With a feeling or impulse, widerstehen can be used with a dative object to express whether someone gives in or not. Erwehren appears here in the fixed reflexive expression “sich einer Sache nicht erwehren können” and specifically refers to giving in involuntarily. For the usual free formulation, widerstehen is the appropriate choice.

Paul kann sich eines Lächelns nicht erwehren.
Paul cannot help smiling.
Paul kann dem Drang zu lächeln nicht widerstehen.
Paul cannot resist the urge to smile.