Surgery may be an option to manage ulcerative colitis when treatment with medication and lifestyle changes isn’t effective, or if you have a complication that requires it.