In some cases of rectal cancer, you will need a colostomy as part of treatment. A colostomy is a procedure in which your doctor forms and opening in your abdominal wall and attaches the end of your large intestine to this opening to remove waste. Your doctor will also remove the part of your rectum that is infected with cancer. If your doctor is able to leave the end of the rectum in tact, this can usually be rejoined with the end of the large intestine, and you will not have to live with a colostomy permanently. However, when rectal cancer grows very close to the anus and the end of the rectum has to be removed, a colostomy can be a permanent solution.