Theories of modified gravity generically violate the strong equivalence principle, so that the internal dynamics of a self-gravitating system in freefall depends on the strength of the external gravitational field (the external field effect). We fit rotation curves (RCs) from the SPARC database with a model inspired by Milgromian dynamics (MOND), which relates the outer shape of an RC to the external Newtonian field from the large-scale baryonic matter distribution through a dimensionless parameter eN. We obtain a > 4σ statistical detection of the external field effect (i.e. eN > 0 on average), confirming previous results. We then locate the SPARC galaxies in the cosmic web of the nearby universe and find a striking contrast in the fitted eN values for galaxies in underdense versus overdense regions. Galaxies in an underdense region between 22 and 45 Mpc from the celestial axis in the northern sky have RC fits consistent with eN ≃ 0, while those in overdense regions adjacent to the CfA2 Great Wall and the Perseus-Pisces Supercluster return eN that are a factor of two larger than the median for SPARC galaxies. We also calculate independent estimates of eN from galaxy survey data and find that they agree with the eN inferred from the RCs within the uncertainties, the chief uncertainty being the spatial distribution of baryons not contained in galaxies or clusters.