If you have any doubt that it MIGHT be an STI, get it checked by a doctor this first time. If they agree that it's ingrown hairs, then you can try to prevent them in the future.
Things to try in the future, Soak in the tub before shaving, use plenty of shaving cream, use a fresh razor-- good quality, like a triple-blade, rinse well afterward. Use a razor that's separate from the one you use to shave any other body part. I have heard good things about using bikini-zone ointment after shaving, but haven't tried it myself. I sometimes use a few cotton-balls with an alcohol-based anti-acne treatment on them to kill any bacteria on the skin that might cause infection in the hair follicle.