My understanding is you have to be on them or tied up. Water around the docks is public, but if you tie up to that dock to fish or get out on a dock the owner can ask you to leave.
Also I think if I read it right they may also place "No Trespassing" signs on the dock for officers to know if someone isn't supposed to be on it.
That's how I understand it from what I read.