In NC, there are probably hundreds of docs with 'for sale' signs... you could say you were just taking a look at the property.
The OP asked about tying up over night. So in your case I guess it took all day so you spent the night but didnt bother to even talk to the owner? If it isnt yours you have zero entitlement to it despite any defects that may exist for its intended use ie they may not have the required water lease but that doesnt make the dock available for public use. In fact just the opposite, it means nobody can use it including the owner, but the owner still has a potential liability. I may have built a house on Government property but without the occupancy permit I cant legally stay there and neither can you. More importantly it doesnt make it your house.
By the way a For Sale sign is not an invitation to trespass. You still require permission to set foot on the property. Yes you could knock on the door to obtain permission and I doubt anyone with a serious interest in selling their property would object but it doesnt change the fact permission is required or you can be charged with trespassing.