Our doorknobs unlock by poking a long nail into the keyhole on the outside. When my kids were smaller, I'd keep a nail above each door on the ledge of the door trim so it was right there where I needed it. Our old house had knobs that required a key but also unlocked with a flat head screw driver. I'd set one out near the door.
If the lock on the inside twists to lock (as opposed to just pushing in the button), you could use some wide blue painters tape to cover the lock on the door handle and hold it in place.
You can replace the bathroom door knobs with inexpensive knobs from home depot that do not have locks on them, the kind used for bedroom or other interior doors. You can also switch out door knobs, put your master bedroom knob (if it's the non locking type) on the bathroom, use the bathroom knob on the master.