Suppose the simple theory with chiral fermions possessing non-trivial gauge anomalies cancellation (it is given here):
$$
S = \int d^4 x \big(\bar{\psi}i\gamma_{\mu}D^{\mu}_{\psi}\psi + \bar{\kappa}i\gamma_{\mu}D^{\mu}_{\kappa}\kappa\big),
$$
where
$$
D^{\mu}_{\psi} = \partial^{\mu} - iA^{\mu}_{L}P_{L} -iA^{\mu}_{R}P_{R}, \quad D^{\mu}_{\kappa} = \partial^{\mu}+iA^{\mu}_{L}P_{L} +iA^{\mu}_{R}P_{R}
$$
Although separately $\psi, \kappa$ sectors are anomalous, together their gauge anomalies are cancelled:
$$
\partial_{\mu}J^{\mu}_{L/R,\psi, \kappa} = \pm \frac{1}{96\pi^2}\epsilon^{\mu\nu\alpha\beta}F_{\mu\nu}^{L/R}F_{\alpha\beta}^{L/R}, \quad \partial_{\mu}(J^{\mu}_{L/R,\psi}-J^{\mu}_{L/R,\kappa}) = 0
$$
Lets generate the mass for $\kappa$ fermion (by using spontaneous symmetry breaking with higgs singlet $fe^{i\varphi}$ with infinite mass for $f$) and integrate it out in the limit $m_{\kappa}\to \infty$. Corresponding effective field theory has to be free from anomalies, so there must be (possibly non-local) a term $\Gamma[A_{L}, A_{R},\varphi ]$ reproducing the anomalous structure of the $\kappa$ sector; it is called the Wess-Zumino term. It is possible to write it explicitly, and it turns out that this it is local (a polynomial in $A, \varphi$ and their derivatives):
$$
\Gamma_{\text{WZ}} = \frac{1}{24\pi^{2}}\int d^{4}x\epsilon^{\mu\nu\alpha\beta}\bigg(A^{L}_{\mu}A^{R}_{\nu}\partial_{\alpha}A_{\beta}^{L} + A^{L}_{\mu}A^{R}_{\nu}\partial_{\alpha}A_{\beta}^{R}+
$$
$$+\frac{\varphi}{f}\big( \partial_{\mu}A_{\nu}^{L}\partial_{\alpha}A^{L}_{\beta}+\partial_{\mu}A^{R}_{\nu}\partial_{\alpha}A_{\beta}^{R}+\partial_{\mu}A_{\nu}^{L}\partial_{\alpha}A_{\beta}^{R}\big) \bigg)
$$
However, as I know, the anomaly (at least in theories with chiral fermions) is the local expression given by the variation of the non-local action. So where the non-locality is hidden?