The way I understood it was a question of intent. The journey to the Dark Side is through emotions, specifically fear and hate. Anakin transforms himself into Darth Vader by choosing to attack others.
- He slaughters the Sand People that he considers responsible for the death of his mother.
- He decapitates an unarmed Count Dooku who had already surrendered.
- He strikes down unarmed children in the Jedi Temple.
- He force-chokes his wife in rage.
Rey, in this case, is defending herself from Palpatine's force lightning. She is not so much lashing out in violence against him but defending herself and deflecting the lightning back to Palpatine. In a way, Palpatine kills himself, thwarting his plan.
The other possibility is that
She actually does get possessed, but Ben's sacrifice to her exorcises the dark side from her.