To be sure this debate doesn't get off track, the references to the homeowner showing up with a gun are hyperbole (exaggerated statements or claims to make a point, but not meant to be taken literally).
The point remains, most homeowners would be upset to find a squatter on their personal dock and no one is aware of a law that permits it. If you had an emergency, tied up and walked up the yard to explain and ask permission, I'm sure most would be fine with it for the night.
Agreed...While it has never happened I would be happy to offer any assistance I could. I am at the end of a protected cove so it is more likely to happen to a house closer to the inlet anyway and there are gas docks that would be the more logical choice in a pinch.