Thank you for your query at DoctorSpring.com
As per your description, it looks like prolapsed haemorrhoid. Sometimes, blood gets clotted inside the mass and is called Thrombosed haemorrhoid.It will be very painful.
You should get examined clinically for exact diagnosis.
Please consult your Surgeon and get the diagnosis confirmed .
If it is a prolapsed haemorrhoid,Surgery has to be done.
Please eat high fiber diet, drink plenty of liquids, eat fresh fruits and vegetables. Your stool should be soft.
If you come back after surgeon's consultation, I will clarify further.
Wish you good health.