Sex is between two consenting partners. Rape is an aggressive act using sex as a weapon. To be raped is to be violated and stripped of control and self-determination. A dream is not reality. Dreaming about something does not mean you actually want to be raped.
Rape occurs when an attacker takes control from a woman in reality.
Men and society in general use this excuse. Women who wear provocative clothing do not invite rape just as men who wear expensive clothing do not invite muggings. Most rapes are committed by black men against white women or white men against black women. In other words, most rapists attack women of the same race. Rapists are mostly psychotic men.