Q-I'm feeling pain and not sure why

So recently I've been feeling pain in my lower right stomach, and when I masturbate using penetration it hurts so bad to a point where I have to stop. I'm not sure what's wrong and it shouldn't be cramps already because my period is the 17th. Can anyone tell me what they think may be wrong?