The “ice” is probably dry ice (frozen CO2). The main component of the martian atmosphere is CO2 and it the whole planet freezes every night.
While this news is months or more old, and the article quoted does not say specifically, the compound is H2O, not dry ice. Discovery made by mars polar lander.