Yes — piles (hemorrhoids) can feel hard, especially when they are external. MedlinePlus notes that external hemorrhoids may cause one or more hard, tender lumps near the anus, along with itching and pain when sitting. Many people improve within a few days with home care.
A hard, painful lump is also typical when blood clots inside an external hemorrhoid (thrombosis). Internal piles usually cannot be felt unless they prolapse. See a clinician for rectal bleeding or symptoms that last more than about a week of self-care, because other conditions can look similar.
Source: MedlinePlus — Hemorrhoids (Piles).