I've got an 11 and 3 year old lab. Last year they learned not to chase the ducks. I could tell Rocket, nearly ten at the time, was interested because of the foot long drool hanging from both sides of his mouth. I kept him on the leash and made him lay down while the ducklings played in the grass. I did this quite a few days in a row, saying NO anytime he looked at them, moved in their direction, etc. He stopped drooling after a couple weeks.
Luna, not quite 2 and therefore still a puppy, didn't drool but she wanted to chase them. I used the same method with her, occasionally she did scatter them but one stern NO would stop her and she soon gave it up (off-leash with her wasn't allowed till the ducks were over a month old) after a coule tries. It probably helped that she never saw Rocket chase them at all.
I did not let them outside alone with the ducks till they were fully feathered.
When I got my chickens the dogs and they were separated by the run fence. Rocket nosed the fence a couple times and I told him NO, he soon lost interest. When I first let them out to free range, I had Luna on the leash but she wasn't interested at all. Luna has since chased dogs out of the yard.
Now I know it won't be as easy or possible with some dogs, Luna's real uncle Boo and his sister, across town, jumped the run fence in his yard and killed 51 chickens in 20 minutes. However, their owner never even attempted to train them. He no longer has chickens, decided it's too risky.
So it can be done, with a 10 week old puppy though, it's probably going to take longer.