Is it a major sin for one who touched or rubbed her own hip - but not genital area, so it is not masturbation - with bad thoughts in mind?
Bismillah Hir Rahmaan Nir Raheem
As Salaamu 3laykum,
I hope you are doing well. With regards to just touching your buttocks or any body part then there are no issues. However, if you touch them with those thoughts that creates enough sexual arousal in your body and you then ejaculate then that would not be permissible according to some scholars.
Regarding intention in it of itself there is no harm as seen from the hadith below:
‘Abdullah bin ‘Abbas (radhiAllahu anhu) reported that the Messenger of Allah (sallaAllahu alayhe wasallam) said that Allah, the Glorious, said: “Verily, Allah has ordered that the good and the bad deeds be written down. Then He explained it clearly how (to write): He who intends to do a good deed but he does not do it, then Allah records it for him as a full good deed, but if he carries out his intention, then Allah the Exalted, writes it down for him as from ten to seven hundred folds, and even more. But if he intends to do an evil act and has not done it, then Allah writes it down with Him as a full good deed, but if he intends it and has done it, Allah writes it down as one bad deed.” [Al-Bukhari and Muslim].
Now if you are adding the rubbing your hip with the thoughts of sexual nature then you are crossing the bounds as that would be classified as masturbation and would be impermissible according to the majority of the scholars. If it is just rubbing and that's all then there is no issue.
Instead of rubbing your hips with those thoughts perhaps the girl can get married. If not then to start fasting. Another way to remove yourself from those situations / environments that can arouse those type of thoughts.
Have a nice day!