Just to be on the safe side, Aelia, you might want to schedule a vet visit for a checkup.
I had a female cat do that after she was a year or so old. She had a mild urinatry tract infection. Not trying to alarm you, but if you want to check all possible reasons she's doing this, it couldn't hurt. And easier to treat a urinary tract infection (if that's what it is) than to train away unwanted behaviour. If it should turn out to be naughtiness alone, I agree with trying to give her treats in the area where she's peeing. It seems most likely to work.
As to the idea of rubbing the nose in it technique - that's not effective with cats. It just ticks them off.