  It has been shown that the nonminimal coupling between geometry and matter
can provide models for massive compact stars that are consistent with the
conformal bound on the sound speed, $0\leqslant {c}_{s}^{2}\leqslant
{c}^{2}/3$, where the core density approaches a few times the nuclear
saturation density. We impose the conformal upper bound on the sound speed on
Rastall's field equations of gravity, with Krori-Barua potentials in the
presence of an anisotropic fluid as a matter source, to estimate the radius of
the most massive pulsar ever observed, PSR J0952-0607. For its measured mass $M
= 2.35\pm 0.17\, M_\odot$, we obtain a radius $R=14.087 \pm 1.0186$ km as
inferred by the model. We investigate a possible connection between Rastall
gravity and the MIT bag model with an equation of state, ${p}_{r}(\rho )\approx
{c}_{s}^{2}\left(\rho -{\rho }_{{\rm{s}}}\right)$, in the radial direction,
with ${c}_{s}=c/\sqrt{3}$ and a surface density $\rho_\text{s}$ slightly above
the nuclear saturation density $\rho_\text{nuc}=2.7\times 10^{14}$ g/cm$^{3}$.
The corresponding mass-radius diagram is in agreement with our estimated value
of the radius and with astrophysical observations of other pulsars at 68%
confidence level.
