From what you describe, a small painful lump just outside the anus with no bleeding and pain that worsens after passing stool is most often a sentinel skin tag with a small anal fissure, or an external pile. If it appeared suddenly and is very tender and bluish, it can be a thrombosed pile. The common trigger is hard stool and straining, so softening the stool matters more than any ointment. Warm sitz baths in plain warm water for 10-15 minutes, two to three times a day and especially after passing stool, along with a local anaesthetic ointment applied gently at the anal opening, usually settle the pain within a week.
Next Steps
Start warm sitz baths after every stool, take a stool softener or isabgol at bedtime, drink 2.5-3 litres of water and add fruits, salads and whole grains so stool stays soft. Avoid straining and do not sit on the toilet for long with your phone. If the lump is still there or painful after 7-10 days, or if you notice bleeding, pus, fever or a swelling that keeps growing, get it examined in person by a physician or general surgeon. You can also book a teleconsult with me on Practo or see me at Synergy Multispeciality Hospital, Miraj for a proper look and prescription.
Health Tips
Avoid very spicy food and alcohol while it is painful, and never use a steroid-containing cream for long on this area on your own. Do not try to squeeze or cut the lump yourself. Sudden severe pain with a hard blue lump needs same-day examination, as early treatment gives much faster relief.