As a low level manager in a production based setting, long bathroom breaks are unacceptable ONLY when they are where abused to avoid actually working. I happen to have an employee that does exactly that, but I am unable to do anything about it anyway to prevent possible HR complaints for discrimination.
I now recently have another employee dealing with a medical issue that sometimes requires extended time in the bathroom during work hours, and they are similarly worried about letting down the team much like yourself. I have absolutely no problem with this because I know their work ethic and understand it is not an attempt to shirk their duties, and make sure to reassure them any time they bring it up. Even to the point of convincing them to stay at work and get paid to do nothing.
Long story short, if your boss says they are cool with it, they probably are. And feel free to ask for reassurance from them if it is still getting to you. I'd rather have a genuinely good employee that has occasional "problems", than a shitty one that has a "pristine" record.