Hello Philomela,
Welcome to the site.
Here is a good place to ask questions, for there is such vast experience spread over the wide membership - many folk will be able to share their experience.
Personally, I do not take much pharma - and when I do on occasion, it is usually on a PRN [as necessary] basis.
But I have found, over the years of having my ileostomy, that medication can be prescribed as either having an enteric coating to the tablet, or in the case of capsules/tablets, they also come in 'gastro resist' form - so I guess your GP will be able to help - in conjunction with your professional clinicians as regards your bowel/ileostomy management.
I believe - in general - you may find that your existing conditions may be able to be effectively managed - albeit by perhaps an adjustment in prescription to help 'protect' and balance your remaining parts of your digestive tract.
It is true that if one loses one's large bowel, then medication and material do not remain in the body for the same length of time as when the body is complete with an intact colon. However, I guess that as you have arrived at the point whereby you are facing bowel surgery, then you already have some measure of these points. The good news, I guess, is that the diseased parts that will be removed will cease to affect you in the current ways you are experiencing.
Individual diet management and times of eating and regularity/quantity of food ingested is a personal recipe of 'test and note and adapt and adopt.' I do feel for your concerns, as it is always the 'unknown' elements that we ruminate over prior to being able to move forward with appropriate change.
Good luck with your future surgery. You may be agreeably surprised once you have undergone the initial adjustment. It takes time to settle, and we all deal with this in different ways - we are ALL individual - there is no standard set of answers.
I am sure you will have many informative replies from the membership, as the management of concomitant conditions is not unusual.
BW
Jayne