Depends. Duckling grow pretty fast, and will be too big for a chicken to mess with in just a few short weeks. Ducks need a water source that is deep enough for them to submerge their heads in. And they get that water everywhere, making it difficult to maintain a dry coop for the chickens. Male ducks can kill hens by trying to breed them.
Some manage to keep both in the same coop and run without issues. Other people have nothing but issues when trying to house ducks with chickens.
I just brooded a batch of chicks with ducklings. Chicks were a week younger than the ducklings. And I can say from experience, it was not pleasant. The ducks are just so messy. Water everywhere, constantly cleaning out sopping wet shavings, feed was always reduced to watery soup that got splattered all over. The ducks went out this past week. And the chicks and I are very happy about it.