If it hurts when she wee's may be a UTI, take her to GP to be checked out, as even if it is from scratching she could have an infection that is making it itchy.

Poor thing hope shes better soon.