If anything causes irritation, a blockage, or an infection, lumps may form on the anus that can make it feel hard.
If a person notices a hard lump or a hardened anus, they should talk to their doctor and have the area examined. Most lumps are not a cause for concern.
https://sp.tamashii.jp/special/ex-aid/