First, rape fantasies are super common among us girls. Typically, it makes us horny to be "forced to enjoy", as in we are helpless and we "must" have sex... by being forced and removing all agency, we have no say on what happens, and then we can feel zero responsibility on actually letting go and enjoying sex (and "filthy" sex). That's also common when we feel guilty wanting some sorts of "dirty" sex... but if we are forced by someone else, it's ok, it's not we decided! I don't know if that makes sense for you.
Second, it is reinforced by enjoying being submissive (which is super hot) and enjoying doing slutty stuff (which is super hot), so overall is a very popular fantasy. It combines plenty of cool stuff!
Third, even if most girls have rape fantasies, that doesn't mean we want to be raped for real. Being forced into sex by a pervert that we don't desire at all, it's a traumatic experience, in which we often fear for our life. It has nothing to do with the fantasy, in practice, since in the fantasies the sex is enjoyed by us, and the people fucking are often attractive to us. I'm talking in general since i don't know the particular kind of rape fantasies you have (there are multiple).
Forth, a typical way to navigate the guilt of masturbating with something that it's often terrible irl, is to practice the "consensual non consensual" (cnc). That is, you give consent to someone to "rape" you and do things without asking for prior consent. That's different than a total non-consensual act (the typical rape). And i'm talking when playing out your fantasy with someone (online or offline), not when you are only fantasizing in your head.
Fifth, when you are only in your head, masturbating, liking tumblr posts, etc, you are not harming anybody. You have 100% right to masturbate with whatever makes you feel pleasure, if it's not damaging anyone and you are just enjoying yourself. It can be very controversial stuff, and in fact it's common that it is, since taboos are hot. People masturbate thinking in animals, in shit/pee, or in furries! There are much more controversial fantasies than rape, and yet it is ok to get off to whatever does you.