Thanks for your query. The way you describe it appears that you are having faecoliths - faeces that has become very hard. This can be confirmed by a physical and ultrasound
is usually a dietary issue, provided medical cause has been excluded. It can be relieved by changing your dietary habits. You need to increase more roughage in your diet, like prunes, green leafy vegetables and cut down on your non-vegetrian food. You will also have to increase your intake of fluids.
Before the dietary changes can have their effect, you may need to take laxatives and/or rectal suppository or enema
to clear the hard stools in your rectum
Wishing you an early relief.