The rectum is the last of the three parts of the large intestine and leads from the bottom of the descending colon to the anus. The urinary bladder is more ventral to it and so covers it unless removed. The picture below shows this as the person is holding the bladder up to show the rectum moving through a final indentation in the abdominal cavity to reach the anus.

urinary_bladder,_rectum.jpg