If you wrap the whole coop in hardware cloth, 1/4" or smaller, they can't get in. They'll chew through anything short of that, sheet metal, or concrete. Otherwise, make sure there's no food in the coop, and set traps that your ducks can't get to. Don't use poison, it gets into the ecosystem and will harm and kill things that you want around to eat the rats.
IMO, the best thing to catch Rats is to make or get a box that the birds can't get into, but leave or make an entry so those filthy rats can go into where you have placed one of those huge rat traps. Put some peanut butter in the trap, they can't resist. Next morning take your pocket knife and maker a slit in the rat and throw it to the chickens. No use wasting the rats life, let the chickens feast in him.
The best way I have seen this implemented is with a classic wire dog crate, Many openings big enough for rats, but small enough to exclude birds. Also has a convenient door for access to empty the traps. Slap a sheet of plywood on top and you can have rain protection and a spot for your birds to sit and poop as well. Haha.
How old are your chickens? If they are full grown, the rat is probably at more risk than your chickens. Otherwise, like the first poster @Fishkeeper suggested, hardware cloth is the only way to truly keep them out. The sooner you do it, the better because he's likely to return with his buddies and could wipe out a flock in one evening.
I wrapped my coop in double chicken wire, burried 1ft down....so agree hc is the only way to go - because they are still showing on camera snacking on who knows what! and those dirty rats (literally) come every night. Guess there is always something the chickens leave behind that they want , and they climb the coop walls to get to my orange tree and eat my navels. Hate, hate, hate those rats. I have tried all kinds of traps, electric, water, poison, the best so far is wood snap traps, strategically placed, like behind a log or against the waterer, usually get one every couple weeks! Good luck!!
Chicken wire is meant to keep chickens in. It doesn't keep much else out, not strong enough or tight-webbed enough.
One thing that can deter them to some degree is hot pepper powders, like cayenne. Birds can't taste the heat, but mammals can, and they don't like the smell much either. Just don't get tempted and sniff it, that is unpleasant.