There have been thousands of unofficial such uses of a steam engine, I'm sure, but I can think of only one official use in that fashion. In the somewhat murky annals of a certain narrow-gauge railway in the Inland Northwest whose name I'd probably better not disclose, I came across a typewritten proposal that the railroad purchase a baggage car and small steam engine (like a saddletanker) and I have to give the author full points for creativity. The idea was to divide the car into stalls for restrooms--men's at one end, women's at the other--with sinks at either end. Access would be through the end doors. For the engine, a unisex facility, with the cab windows boarded over, a door at the back and a toilet installed in the firebox door. To flush, you pulled the throttle. A sink would be installed in place of the boiler check valves.
As I saw nothing of the kind around the place, I assume with great relief that the plan didn't go through. Talk about desecration.