Yes it might be piles. Piles symptoms are pain, swollen anus and/or bleeding. Schedule an apointment with colon- rectal specialist soon. They can figure out whether its piles or something else. But it need immediate attention.
Avoid constipation. Get enough sleep. Follow the below link.