Can I use a #14 ground wire with #12 hot and neutral wires?
It depends on the breaker, not the wire. NEC 2023 Table 250.122 sizes the equipment grounding conductor by the rating of the overcurrent device ahead of the circuit. A 20 amp breaker requires a 12 AWG copper EGC, so 14 AWG ground with 12 AWG conductors on a 20 amp breaker is a violation. Put that same cable on a 15 amp breaker and the 14 AWG ground is legal, because Table 250.122 only asks for 14 AWG copper up to 15 amps.
How Table 250.122 works
The table is driven entirely by overcurrent device rating: 15 amps needs 14 AWG copper, 20 amps needs 12 AWG, 30 amps needs 10 AWG, 60 amps needs 10 AWG, 100 amps needs 8 AWG. The EGC has one job, carrying fault current long enough to trip the breaker. A ground sized too small can overheat and fuse open during a fault before the breaker clears, and then the fault sits on every metal surface downstream.
Where this actually comes up
You see it when someone extends a 20 amp circuit with scrap wire, mixes cable types in a junction box, or pulls individual THHN and grabs the wrong spool for the green. It also shows up in fixture whips and some imported equipment leads. If the circuit is protected at 20 amps, every EGC serving it needs to be 12 AWG copper minimum, all the way to the last device.
The upsize rule
250.122(B) adds a wrinkle: if you upsize the circuit conductors for voltage drop, you must upsize the EGC proportionately by circular mil area. A 20 amp circuit pulled in 10 AWG for a long run needs its ground bumped up too, not left at 12 AWG.
Field notes
The practical answer when you find 14 AWG ground on a 20 amp circuit: swap the breaker to 15 amps or repull the run. Downgrading the breaker is legal as long as the load allows it, and it is usually the ten minute fix that passes.