Thoroughly wash out one of those little hand sanitiser bottles and decant your soap into that. Those bottles are small enough to tuck into a pocket (or bra) for a trip to the bathroom and will easily fit into your purse otherwise (and then you have your soap with you wherever you go)...
Ohhh... and some kinds have carrying cases that allow you to hook it to things. I am half joking when I say to put it on a lanyard to make soap on a rope... but actually, that might be a solution, too.
Here are the holders that I'm trying to describe.
https://www.bathandbodyworks.com/c/hand-soaps/pocketbac-sanitizer-holders
I have seen more generic holders if some of those are too wild for your workplace/style.
I've seen them for tiny bottles of Purell in/near the travel toiletries section of stores.
But that's sanitizer, which s very harsh. I would put the soap in a sanitizer or other small bottle and just carry it in a lanyard or pocket.