Examples of surgeries and treatments that can cause erectile dysfunction are:  Operations in the pelvis. Surgical removal of the prostate gland, bladder or rectum due to cancer. Radiation therapy to the pelvis.