You are correct about the conduction of metals. The 'delocalised' electrons in a metal structure normally move randomly. However, when a voltage is applied they all move in a particular direction. When molten (or dissolved) the ions in an ionic compound will move towards the oppositely charged electrode. i.e. cations (positive ions) are attracted to the cathode (negative electrode); and anions towards the anode. When they arrive at the electrode the positive ions gain electrons from the electrode (to become neutral) and the negative ions give up electrons to the positive electrode ... and so the circuit is complete. Free electrons do not pass through the molten or dissolved material.