As the photon gets absorbed by the electron and goes to higher energy state, does the photon remains in the electron itself in some form, thereby increasing the mass of the electron?
The atom absorbs the photon that kicks up an electron to an excited state, and it is the atom that will emit a photon when it de-excites. Not the electron.
Is the invariant mass of an atom higher when the electron is in an excited state?
Take the hydrogen atom.
The ground state energy is at -13.6eV. This means that the mass of hydrogen is less than the mass of the proton+the mass of the electron by 13.6eV. If a photon of 9.2eV kicks the electron to a higher energy level, the rest mass of hydrogen will increase by the energy supplied by the photon and will be only 3.4 eV less than that of the free electron+proton.