The detection of gravitational waves (GWs) and an accompanying electromagnetic (E/M) counterpart have been suggested as a future probe for cosmology and theories of gravity. In this paper, we present calculations of the luminosity distance of sources taking into account inhomogeneities in the matter distribution that are predicted in numerical simulations of structure formation. In addition, we show that inhomogeneities resulting from clustering of matter can mimic certain classes of modified gravity theories, or other effects that dampen GW amplitudes, and deviations larger than $delta u sim mathcal{O}(0.1) (99% rm{C.L.})$ to the extra friction term $ u$, from zero, would be necessary to distinguish them. For these, we assume mock GWs sources, with known redshift, based on binary population synthesis models, between redshifts $z=0$ and $z=5$. We show that future GW detectors, like Einstein Telescope or Cosmic Explorer, will be needed for strong constraints on the inhomogeneity parameters and breaking the degeneracy between modified gravity effects and matter anisotropies by measuring $ u$ at $5 %$ and $1 %$ level with $100$ and $350$ events respectively.