Tomato plants and other nightshades are toxic... but my understanding is that they are not fatal. I've heard many stories of ducks eating tomato plants without getting poisoned. My ducks got hold of a sweet potato vine that grew down to where they could reach it from my swimming pool... I panicked, worried they would die, but my husband looked it up and discovered that it is mostly a hallucinogen. One of the ducks went on a fish-killing rampage in the pond. LOL. We just watched them and made sure they had lots of fresh water. They were OK.
That doesn't mean that you should let your ducks eat tomato plants... it is definitely bad for them. I keep mine in a raised bed and trimmed back so they can't reach the leaves. You can put cages around them if you can't relocate. If they fall ill, you can administer powdered activated charcoal to help absorb the toxins (not BBQ charcoal, but the kind used to treat drug overdoses). There is a sticky somewhere on this site on how to give it to the ducks.
Tomatoes themselves are fine, though, my ducks love them!