You're right. It's heartbreaking. My best friend is ill.
I'm loving and supporting her at her time of need. I'm putting up with her obsessions and insanities as we've been through thick and thin already . I'm not a fairweather friend. I know she'd do the same for me if I were ill.
It seems you'd walk away from her though...
You're in no position to judge if this is a friendship or not, based on one person in the friendship feeling comfortable enough to tell a friend that they can't use their loo.
I hope you're not my "friend"
Although I agree with people saying the friend has a right to boundaries and to not have someone in their home and all the possible reasons including vulnerabilities and mental health issues etc...
I'll tell you what, I'm totally over dysfunctional friendships and difficult people and putting up with other people's obsessions and insanities when I'm bringing calm, consistent, open, and friendly interaction to the table. I've been through enough trauma and abuse in my lifetime and I've got my own issues but I don't selfishly take out my stuff on other people - someone needs to use my loo after giving me a lift home, they're absolutely very welcome. Not cos I'm a mug with no boundaries and not cos my flat is immaculately clean ready for impromptu visits. If I went in someone's home and it was a right mess or they were angsty, I'd be totally polite and respectful, use the loo, and leave quickly and not mention it.
So for me, in the here and now, how I would handle this OP is back away from that connection and in no way whatsoever is it a 'friendship'. I want equality in my friendships, healthiness, and openness. That's just me and my tuppenceworth.