The location does assist the possibility of this being an ingrown hair.
But the presence of swollen lymph nodes
raises concern for a possible different cause.
If this is indeed and ingrown hair, warm compresses to the affected region, warm sitz baths with epsom salt shall reduce and completely relieve you of the same.
But then again, the presumed diagnosis is only based on what you think. It is best for a doctor to physically examine you and diagnose tou accordingly.
Hope this helps.