The question seems as nearly a duplicate of Peierls substitution vs minimal coupling.
Indeed, the point of Peierls substitution is introducing magnetic field into a tight-binding Hamiltonian or even a band-Hamiltonian (with non-quadratic dependence on momentum or in an effective mass approximation.)
In either case, the problem contains two elements:
- We know how to include magnetic field (via vector potential) into a Hamiltonian of a free particle, but both tight-binding approximation and effective mass approximation are approximations, and the electrons in solid state are not free electrons, but quasiparticles, obtained, e.g., by trancating other bands (and neglecting a bunch of interactions.) There is no guarantee that we can treat them as if they were free, even if we expanded the dispersion relation to the second order in the wave vector and assumed spherical symmetry.
- Another problem is that adding vector potential to the real electronic Hamiltonian destroys its translational symmetry and Bloch theorem, on which all the solid state physics (including the tight-binding approximation) is based on.
Thus, Peierls substitution is a non-trivial statement that, even for tight-binding and effective mass approximations we can treat the vector potential, as if we were dealing with free particles, forgetting about the lattice background... provided that the magnetic field is weak (negligible flux through a unit cell.)
Gauge invariance
The integration path for vector potential is subject to gauge invariance, just as for free particles. What really matters is the sum of phases accumulated along any closed path, which is the flux through the area enclosed by the path (in lattice problems one typically assures that there is the same flux through every unit cell.)
As an example, consider the tight-binding/hopping Hamiltonian description of the Aharonov-Bohm interferometer below. It could be described by a Hamiltonian:
$$
H=\sum_{k,\nu=L,R}E_{k\nu}c_{k\nu}^\dagger c_{k\nu} + \sum_{i=1,2}E_i d_i^\dagger d_i + \sum_{k,\nu=L,R, i=1, 2}V_{\nu i}\left[c_{k\nu}^\dagger d_i + h.c.\right]
$$
where the hopping matrix elements have phases:
$$
V_{\nu i}=|V_{\nu i}|e^{i\phi_{\nu i}}.
$$
Calculating the properties of this Hamiltonian - e.g., the transmission from left to right - would involve matrix element products like
$$
V_{L1}^*V_{R1}V_{R2}^*V_{L2} = |V_{L1}^*V_{R1}V_{R2}^*V_{L2}|e^{i(-\phi_{L1}+\phi_{R1}-\phi_{R2}+\phi_{L2})}=|V_{L1}^*V_{R1}V_{R2}^*V_{L2}|e^{i\Phi},
$$
which describe the path around the interferometer. Only the phase $\Phi$ will appear in the results for the physically measurable properties, which means that phases of the matrix elements can be varied at will, as long as they sum up to the correct quantity:
$$
\Phi = -\phi_{L1}+\phi_{R1}-\phi_{R2}+\phi_{L2}.
$$
E.g., a possible choice is setting $\phi_{L1}=-\Phi, \phi_{R1}=\phi_{R2}=\phi_{L2}=0.$
(image source)