Frozen water is ice and is solid, so therefore ducks cannot swim in ice.
However i guess you are referring to the water being very cold
Ducks have very little muscle in their feet, also have a very clever circulation system, where warm blood going down to the feet goes closely past the cold blood coming back from the feet. This is called a counter-current heat exchange as heat is exchanged from the hot blood to the cold, meaning that the birds do not lose too much heat through their feet.