Okay... Just curious. This may sound crazy, but I study poop. Not professionally or scientifically, just here at my house with my birds and pictures that people post. So if you had said that the vet suspected coccidiosis, I could add to my mental database that foamy poop in ducklings could mean a protozo like coccidia. In birds other than waterfowl, I have noticed that foamy poop almost always means a protozoa like coccidiosis or histomoniasis (blackhead). Not trying to say your vet is wrong 
, just sharing what I have seen in chickens, peafowl and turkeys. With ducks I have not seen any foamy poop yet.
Sure hope she continues to improve!
-Kathy