The vortex lattice (VL) in the high-kappa superconductor YBa2Cu3O7, at 2 K and with the magnetic field parallel to the crystal c-axis, undergoes a sequence of transitions between different structures as a function of applied magnetic field. However, from structural studies alone, it is not possible to determine precisely the system anisotropy that governs the transitions between different structures. To address this question, here we report new small-angle neutron scattering measurements of both the VL structure at higher temperatures, and the field- and temperature-dependence of the VL form factor. Our measurements demonstrate how the influence of anisotropy on the VL, which in theory can be parameterized as nonlocal corrections, becomes progressively important with increasing magnetic field, and suppressed by increasing the temperature towards Tc. The data indicate that nonlocality due to different anisotropies play important roles in determining the VL properties.