This function (ANSI F19) includes a deadbolt that is operated inside a thumbturn but can be retracted with a coin or flathead screwdriver from outside. There may also be an occupancy indicator on the outside of the door.
In Seattle this function is less popular in urban areas due to the prevalence of drug abuse and the tendency for those who would abuse drugs to do so in bathrooms. Manufacturers have responded with electronic options requiring a code to enter along with an occupancy indicator. When occupied the code will be disabled, though the lock can be overridden with a master code in emergencies.