You have more than 2 rats. If you have 2 rats you could easily have dozens more.
We manage our rat population with our dogs. They kill the rats when we find them. If we find a nest we can dig out, we do.
You can also use snap traps, baited with duck food, cat food, sunflower seeds or peanut butter.
Store feed in metal containers as they will find your feed bags and chew through them. Regularly sweep up waste. Only feed what your animals will eat in a day or remove feed in the late afternoon before sundown.
Rat poison is available and can be placed in large traps that don't allow it to be removed by rats or accessed by ducks, but they can crawl in and gnaw on it. This means dead rats found must be handles with care and disposed of carefully to not poison other animals.
I had VERY limited success with Rat-X (pet safe rat killer) but not enough to suggest it.
Rats will do more than eat your feed. They will eat your baby ducks, your eggs, or even bite adult birds so take care.