This is a Hard One. The Answer is Yes and No.
No in the fact that a person has Free Will and an Evil Person can choose to commit Rape.
Yes in that a person who has spiritually weakened themselves can become possessed and the Demon, through them, commits Rape. This person will have no memory of committing the Rape and he will have had a Black Out of the whole event.
A person becomes spiritually weakened when they do one or more of these things: Drink to the point of Intoxication, Drug Usage, Participating in the Occult, Fly into a Blind Rage.
The person will display a completely different personality when this occurs.
The Demons have no Genitalia of their own so when not in a Host's body they can only use their hands and tongues to molest someone. Many a Priest or Paranormal investigator has been done this way by a being they can not see.
This does not excuse every criminal from the Crime of rape but it is a possibility.
This has the effect of a 2 for one scenario for a Demon. They perform a Rape harming someone and then leave someone holding the bag to do prison time harming that person also.
To a person Who thinks they are being raped by a person possessed by a demon... Simply Pray and Praise God. This will be like pouring gasoline on them and lighting them on fire. They will immediately want to get away from you. This is one way of telling if it is the person committing the rape or a demon doing it through them.
But be aware, that once you do this that the demon will become enraged. You must continue in this prayer and praise to God until you are safely away from the affected person.
This will in no way stop a Person in their own free will from Raping you. Best to find a weapon and fight back!