I’ve just tried it and it works exactly as I suggested. I set up O as the shortcut. I then drew two rectangles. The default was Object Snap on. After I pressed O I could no longer connect the two rectangles using object snapping. Pressing O again turned it back on. In other words , it is a true toggle switch. Like a light switch in fact. You don’t need separate switches to turn the lights on and off.
There are also Snap toggle toolbar buttons you can add to the toolbar.
(There button images change to indicate the status. Their under the Arrange menu commands.)