This is really out of my range of experience, but I want to at least acknowledge your post and your fears.
Is this behavior new? Has it come on quite suddenly? I ask this because I wonder if something besides her IBS is at the root of this.
I find it a bit disturbing when you tell us that this behavior gets worse not ONLY when she goes to someone else's house but also her fathers.
You say she is on meds for her IBS AND anxiety. What is she taking for the anxiety? How long has she been on it? If you feel it's no longer working, why haven't you taken her to the doctor to discuss either an increase in the dosage or trying a different med?
That she won't sleep in her own bed at 13, in my humble, non-professional opinion is not a good thing. I can understand it if she is really sick with the IBS, but other than that, she should be encouraged to sleep in her own room.
It is very possible for a 13 year old to have seperation anxiety, but there is usually a deep reason for that fear.
I would take my daughter to her pediatrician and tell him/her everything you've told us and I would definitely discuss getting your daughter into some therapy.
I would start asking some serious questions about why her symptoms get worse when she goes to her fathers.
Your daughter has some issues going on and you need to find out what they are as soon as possible.
This may be nothing more than her fear of having diarrhea and nausea at someone else's house, but it could be something much deeper. I am avoiding writing what the worse case scenario might be.
Get her some help now.
Peace
Greenlydia