I understand rectal pain and it really hurts!feels like someone has crammed a can of tennis balls up your hinney!only recently experienced it myself.there are meds that help, I found taking flexeril helps me.however, it can cause drowsiness, so maybe ask md for suggestions. I would suggest seeing a gastroenterologist soon for some assistance and answers. Hope you feel better soon! Also, think about taking stool softeners as they may ease the movement and not encourage spasms.
Welcome to the gastroenterology community! This could definitely be related to the hemorrhoid. I would recommend seeing your doctor about this to make sure this is hemorrhoids and not something more serious.