Under all circumstances anode and cathode are defined as follows:
Anode or Cathode?
Rechargeable cells offer a helpful way to see why the cathode in a galvanic cell becomes the anode in an electrolytic cell. Rechargeable cells work in both galvanic and electrolytic modes - galvanic when they are powering devices; electrolytic when they are being recharged.
Electrodes in a Rechargeable Cell
Spontaneous (i.e. ΔG is negative) redox reactions at the electrodes produce a voltage. The voltage can drive electrons through electric devices, such as a lightbulb.
In the diagram above, species spontaneously transfer electrons to the electrode on the right; species are oxidized, so this is the anode. The electrons transferred to the anode flow from it through the lightbulb to reduce species at the cathode.
In galvanic cells, the anode is negatively charged. Electrons are pushed on to the anode by species in solution.
Non-spontaneous redox reactions are driven by an external voltage. The processes here are the galvanic cell's in reverse.
The current from the power source pushes electrons on to the electrode on the right of the diagram, where they cause reduction of species - hence this electrode is the cathode.
In electrolytic cells, the cathode is negatively charged. Electrons are pushed on to the cathode by the external power source.