Salt and sugar are white solids purified away from colored impurities by fractional crystallization, as was described above by OP and the response.
SO2 is a common oxidizer that will decolorize impurities, it is commonly used to "bleach" flour. Since flour is not soluble, not a single compound, and would lose useful properties if one tried to crystallize it from a water solution, SO2 is used. The SO2 also kills pests, and changes the behavior of the flour in ways that are desirable.
You probably could decolorize a sucrose solution with SO2, but it seems impractical to me. The colored impurities, molasses and such, would still be there. I don't expect the colored impurities in rock salt would "bleach away" if exposed to SO2.