Everyone with a garden should be allowed to keep one or two hens or ducks for eggs. They are no more of a nuisance than neighbours' dogs, even cats shitting in the newly dug veggie plot or some noisy children (practising their bagpipes in the porch or own a drumkit). Provided you only have cockerels if you don't have immediate neighbours lol. I've seen one of these lovely wee coops (eglu?) for small gardens, which look like an oversized old style MacMonitor.
Rats just have to be dealt with appropriately. They are on the increase anyway. We used to get them even without the birds, in the garden compost (no cooked food or meat in there!) , or over the winter in the attic. Environmental health does a good job...
