Generalised Symmetries and the Ermakov-Lewis Invariant