Can hemorrhoids and constipation cause contractions?

They are associated. I assume the contractions you are inquiring about are intestinal or colon cramps. Constipation is usually a functional problem caused by a lack of dietary fiber. When the colon and rectum have to generate more pressure than they are designed to work at, this results in cramps, hemorrhoids and diverticulosis.