Yes, it’s her leaving do, she can invite whoever she likes.
Yes, it is perfectly reasonable for you to feel hurt that you are not one of those people.
My previous school was quite cliquey, and I had some lovely friends there but also one person who really hated me (never really understood why - we’d been up against each other for promotions a few times but usually she beat me so not sure why she’d be salty about it). She was a ringleader and often organised things where she would intentionally invite everyone, including people who were more part of “my” group, quite obviously to make me feel uncomfortable. I confronted her once and she laughed that if it was an official work event, of course I’d be invited, but as these were private events, of course she’d only invite her friends. It made me feel really small and like I’d been petty to be upset.
Thing is, teaching is relatively transient, and as people moved on and the dynamic of the department changed, more and more people saw her true colours. When I left, I invited her to my leaving do, because I invited everyone, and it was just drinks in a pub garden. I didn’t think she’d come, but she did, and I kid you not, she sat on her own at a separate table all evening. I went over to talk to her a couple of times (I felt obliged as the host) and she barely said a word to me. It was the weirdest thing.
I don’t know what the point of my story was really. I guess what goes around comes around?