Why do I get rectal pain on my period?

May be endometriosis. Endometriosis may be the cause, but there are other possible reasons for rectal pain as well. The fact that you say pain is worse during menses makes endometriosis more likely as a cause. Surgery is the only way to make this diagnosis for sure.