Medical student and amateur historian here. This may not answer your question completely but may add some insight.
Doing a search of the literature came up with two articles that are noteworthy. One from the year 1848, is the first article that I can find that describes a rectal exam being preformed. There are likely older descriptions of the procedure being preformed that I am either unable to find or are in other languages. That being said in the paper from 1848, the author describes a 9 year old patient who has failed to urinate for 24 hours. The history and physical remain unremarkable until a rectal examination reveled a large tumor of the prostate and neck of the bladder. Being the 1840's there was nothing that could be done and the patient expired. In the article there is no mention to any objections from the boy or mother pertaining to the rectal exam.
The second article I came across is the first I can find that goes into specific detail on how to perform a rectal exam. This article from 1936 makes no comment on the comfort of the patient or any other social commentary on the issue.
After finding these two article I worked my way forward through the literature and can find no record of wide spread moral or religious opposition to rectal exams.
I think what is important to note that it is only recently in the history of medicine that social issues pertaining to the patient have come into focus. I am open to anyone coming and correcting me but from what I found in the scientific literature there has been no opposition outside of individuals objecting.
A personal anecdote. When my medical school class was taught about rectal exams we learned that people would definitely object to having one done but the most common reason would be that guys just didn't want a finger up their butt. I have no evidence to support that though.
Sources:
Abel, A. L. "Examination of the Rectum." Postgraduate Medical Journal 12.130 (1936): 301-07. Web.
Bree, C. R. "Case of Medullary Sarcoma of the Prostate Gland, in a Child Aged Nine Months." Bmj S1-10.7 (1846): 76-77. Web.