  Recently, Rastall gravity is undergoing a significant surge in popularity. We
obtain a power-law total mass-density profile for the inner region (within
several effective radius) of early-type galaxies (ETGs) from the space-time
structures which are described by the static spherically-symmetric solutions of
Rastall gravity under the assumption of perfect fluid matter. We find that in
the inner region of ETGs, the Rastall dimensionless parameter
$\beta=\kappa\lambda$ determines the mass distribution. We then use 118
galaxy-galaxy strong gravitational lensing systems to constrain the Rastall
dimensionless parameter $\beta$. We find that the mean value of $\beta$ for
total 118 ETGs is $\beta=0.163\pm0.001$(68\% CL) with a minor intrinsic scatter
of $\delta=0.020\pm 0.001$. Our work observationally illustrates the physical
meaning of the Rastall dimensionless parameter in galaxy scale. From the
Newtonian approximation of Rastall gravity, we also find that an absolute
isothermal mass distribution for ETGs is not allowed in the framework of
Rastall gravity.
