The extended and X-ray-emitting interstellar medium of early-type galaxies is often used as a tool to determine their total mass M and stellar orbital anisotropy beta profiles, based on the hypothesis of hydrostatic equilibrium for the hot gas. Here we investigate the effects that deviations from equilibrium have on M and beta estimates, by using simple analytical calculations and hydrodynamical simulations representative of gas-rich galaxies. We show that the deviations of the X-ray-determined beta(est) and M-est from the true values are linked by a remarkably simple relation; in particular, M is underestimated if beta is overestimated. Also, more radially anisotropic orbital distributions than the true one are deduced in presence of gas infall velocities of the order of the local stellar velocity dispersion (as are likely in the central regions of galactic cooling flows). The results of this analysis are applied to the most thoroughly investigated bright elliptical, NGC 4472. First we show that beta(est) recently derived from X-rays corresponds to a galaxy that is unstable by radial orbit instability. Then, assuming as true beta and M the optically derived values, we show that the differences beta(est)-beta and M-est-M agree with the predictions found here in the case of lack of hydrostatic equilibrium, which points to the latter as a possible explanation for the discrepancies. This analysis casts doubts on the possibility of using X-ray information to determine accurately the dynamical properties of bright X-ray-emitting ellipticals, at least within their R-e.