Millisecond pulsars are perfect laboratories to test possible matter-geometry
coupling and its physical implications in light of recent Neutron Star Interior
Composition Explorer (NICER) observations. We apply Rastall field equations of
gravity, where matter and geometry are non-minimally coupled, to Krori-Barua
interior spacetime whereas the matter source is assumed to be anisotropic
fluid. We show that all physical quantities inside the star can be expressed in
terms of Rastall, $\u03f5$ , and compactness, $C=2GM/R{c}^{2}$ , parameters. Using
NICER and X-ray Multi-Mirror (XMM-Newton) X-ray observational constraints on
the mass and radius of the pulsar PSR J0740+6620 we determine Rastall parameter
to be at most $\u03f5=0.041$ in the positive range. The obtained solution
provides a stable compact object, in addition the squared sound speed does not
violate the conjectured sound speed ${c}_{s}^{2}\le {c}^{2}/3$ unlike the general
relativistic treatment. We note that there is no equations of state are
assumed, the model however fits well with linear patterns with bag constants.
In general, for $\u03f5>0$ , the theory predicts a slightly larger size star
in comparison to general relativity for the same mass. This has been explained
as an additional force, due to matter geometry coupling, in the hydrodynamic
equilibrium equation contributes to partially diminish the gravitational force
effect. Consequently, we calculate the maximal compactness as allowed by the
strong energy condition to be $C=0.735$ which is $\sim 2\mathrm{\%}$ higher than general
relativity prediction. Moreover, for surface density at saturation nuclear
density ${\rho}_{\text{nuc}}=2.7\times {10}^{14}$ g/cm${}^{3}$ we estimate the maximum
mass $M=4{M}_{\odot}$ at radius $R=16$ km.