This situation may be perianal abscess. You can see if there are any symptoms:
1, burning or jumping pain in anus, aggravated when defecating or walking, and a few have dysuria.
2, may be accompanied by chills, fever, general malaise and other symptoms.
3.b-ultrasound can detect pus cavity.
4. The number of white blood cells and neutrophils increased.
5. There are induration or lump around anus, local temperature rises, tenderness or fluctuation. For abscess located above levator ani, rectal digital examination can touch tender mass, and rectal puncture can extract pus.
I hope the above can help you, and I suggest you do a good job in related examination and symptomatic treatment.
I wish you a speedy recovery.