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.

'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 suppress
'unterdrücken' and 'sich einer Sache nicht erwehren können' overlap when dealing with feelings or thoughts. 'unterdrücken' means that you hold back a feeling or impulse so that it does not become visible. 'sich einer Sache nicht erwehren können', on the other hand, means that you cannot resist a feeling, thought, or impression. So the difference is important: with 'unterdrücken', control succeeds at least partly; with 'sich nicht erwehren können', it specifically does not succeed. The words can be confused because both have to do with inner resistance, but they show opposite results.

Auf der Feier konnte sie sich des Eindrucks nicht erwehren, dass alle über sie sprachen.
At the party, she couldn't shake the impression that everyone was talking about her.
Der Fahrer unterdrückte seine Angst und fuhr langsam weiter.
The driver suppressed his fear and slowly drove on.