Probably. New York State requires that dogs be "adequately restrained" when off their owner's property, and most towns and cities have added local leash laws. Because leash laws are a matter of local law, check with your municipal clerk's office for information on your town or city ordinances.
Increasingly, municipalities are setting aside sections of parks for use as off-leash recreation areas. DFNY offers "Guidelines for a Responsible Off-leash Community" for off-leash enthusiasts.
Note: In New York City leashes cannot exceed six feet in length.Where do I find information on how much barking is "too much" barking where I live?
Many towns have ordinances on maximum noise levels of all types known as "nuisance noise" ordinances. Others may have a law specifically mentioning barking, howling, etc. Check with your municipal clerk's office for further information.
Whether you have a nuisance noise or barking dog ordinance or not, be considerate of your neighbors. Don't let sustained barking and howling become an issue.