I don't have ducks but I have water for my chickens.
The only thing I know to control algae is elbow grease..that is washing the bowl out completely with dawn dish soap, rinsing very well and refilling with fresh clean water.
Keeping it out of sunlight helps also. Algae needs sunlight to grow so clear or light colored containers will be a growing field for it. Best to use a non see through container like galvanized steel to slow down the growth.
I have lost the battle and came to a conclusion to just use open stainless steel dog bowls and put fresh water in it several times a day because with this heat they need cool water. I do wash completely and rinse about every other day. Only takes a few extra mins and beats trying to clean those water holding tanks.