Ions in aqueous solution can be separated using a direct current electrical
driving force on an ion-selective membrane. Electrodialysis usually uses many
thin compartments of solution separated by membranes that permit passage of
either positive ions (cations) or negative ions (anions) and block passage of the
oppositely charged ion.
Cation-exchange membranes are alternatively stacked with anion-exchange membranes placed between two electrodes. The solution to be treated is circulated through the compartments and a direct current power source is applied. All cations gravitate toward the cathode (negatively terminal) and transfer through one membrane, while anions move in the opposite direction, thereby concentrating in alternative compartments.
Electrodialysis is commonly used to recover spent acid and metal salts from plating rinse. It obviously is not effective for non-polar solutions. But then, you already knew that, didn't you?