Exactly this. Depends totally on where you are. Where I am, they absolutely can and have done this. I filed complaints and the county followed through. The person had to take down a shed and other outbuildings. This is Riverfront, very strict rules, but the sheds were to close to the road, not...
I live on a River. If ever I saw a rat in my coop I would not blame the River, it's my bad. It's close to impossible for some people but if you're determined to do it and do it right, start with a forum search on "Rats" and find the many threads where Al Gerhart posts Howard E.'s article about...