I have inflammatory bowel disease and my doctor says that I should have surgery. Can I try longer at managing my disease?

Maybe. It depends on why you have been told to have surgery. Reasons for surgery may be failure of medical therapy, persistent blood loss anemia, intestinal blockage, intestinal fistulas, or concerning changes for cancerous or pre-cancerous changes. Tell your doctors and surgeon that you would want to continue medical therapy, as ask them if that is a safe choice for you.
IBD and surgery. It will depend which part of the bowel is affected, for how long you have had the disease and what other conditions or complications may exist. Once you take all that into account, surgery may be the best option.