A 'free' electron accelerated in an electromagnetic field can both absorb and emit a photon.
Both electrons and photons belong to the table of elementary particles in the standard model of particle physics, i.e. are quantum mechanical entities and have to be modeled as such. Thus , an electron does not absorb a photon, it interacts with a photon according to the rules of quantum mechanics. Feynman diagrams are used to model the integrations necessary to find the probabilities of interacting electrons and photons, in this case called Compton scattering.

What about an electron accelerating in a gravitational field?
If we accept the effective quantization of gravity, i.e. that gravitons will be part of the future standard model of elementary particles, an analogous diagram will exist, where a graviton will replace one of the photons in the diagrams.