If the person with memory loss requires assistance to use the toilet, or may wander off while you are using a public toilet, then a Radar Key is a good solution.
A Radar Key unlocks accessible toilets. These are usually completely self-contained and large enough to accommodate two people.
https://www.disabilityrightsuk.org/shop/official-and-only-genuine-radar-key