  In $U(1)$ lattice gauge theory with compact $U(1)$ variables, we construct
the symmetry operator, i.e.\ the topological defect, for the axial $U(1)$
noninvertible symmetry. This requires a lattice formulation of chiral gauge
theory with an anomalous matter content and we employ the lattice formulation
on the basis of the Ginsparg--Wilson relation. The invariance of the symmetry
operator under the gauge transformation of the gauge field on the defect is
realized, imitating the prescription by Karasik in continuum theory, by
integrating the lattice Chern--Simons term on the defect over \emph{smooth\/}
lattice gauge transformations. The projection operator for allowed magnetic
fluxes on the defect then emerges with lattice regularization. The resulting
symmetry operator is manifestly invariant under lattice gauge transformations.
In an appendix, we give another way of constructing the symmetry operator on
the basis of a 3D $\mathbb{Z}_N$ topological quantum field theory, the
level-$N$ BF theory on the lattice.
