Isotopes of potassium decay to argon and the amount of accumulated argon - combined with knowledge of the decay rate - allows one to use the system as a clock:
that assumes you know how much it started with and what the environment was like then
The Wikipedia page covers these issues, albeit for crystalized rock instead of ice. The measurement is a ratio, so the key thing is establishing that Argon 40 is normally not present in rain or brand new ice.
It's safe to assume that these assumptions have been accounted for by the scientists developing and performing isotopic dating.