Is the hip flexor muscle right near the groin?

Yes. The pelvis and hips have a lot going on in terms of muscles and attachments. I suspect you could find a decent diagram online.