CO2 does not readily form ions when it's dissolved in water, as it is a nonpolar molecule. Unlike ionic compounds like salt (NaCl), which readily dissociate into ions when dissolved in water, CO2 remains largely molecular when it dissolves in water.
However, CO2 can undergo a chemical reaction with water to form carbonic acid (H2CO3), which can then dissociate into ions sharpest blade in the world:
CO2 + H2O ⇌ H2CO3 H2CO3 ⇌ H⁺ + HCO3⁻