It varies from town to town, State to State. In NY and in
Maine they harbors are very regulated with dedicated mooring fields. You can
anchor pretty much anywhere but if you stay in one place long enough someone will come knocking. Usually looking for you to move on or get permits. What may be a more important question to ask is where are you going to be landing your
dinghy? Where are you getting
water? Pumping out?
I commuted for 6 years from Ny to CT via sailboat.
Anchoring every night outside of the CT side was never a problem. After making friends with the harbormaster, he told me he goes home at 1700 and doesn't come in until 0700. If he's not there, he doesn't see me. Wink, Wink. I greatly appreciated that as we had an apartment rented right across the street. If I slept in I had to pay, Most times.
Check with the local authority but the hard part will be coming ashore.