This is a bordism problem, and as such can be answered using algebraic topology. I'll answer in the unoriented setting, then indicate how to modify things if $M$ and $W$ are required to be oriented.

Complex line bundles $\mathcal{L}$ over $W$ are classified by maps $f:W\to BU(1)\simeq \mathbb{C}P^{\infty}$. We want to decide if there is a $4$-manifold $M$ with a map $F:M\to BU(1)$ such that $\partial M=W$ and $F|_{\partial M}=f$.

We can define an equivalence relation called *bordism* on the set of pairs $(W,f)$ where $W$ is a closed $3$-manifold and $f:W\to BU(1)$ is a continuous map. Two such pairs $(W_0,f_0)$ and $(W_1,f_1)$ are *bordant* if there is a pair $(M,F)$ consisting of a compact $4$-manifold $M$ with $\partial M = W_0\sqcup W_1$ and a map $F:M\to BU(1)$ satisfying $F|_{\partial M} = f_0\sqcup f_1$.

The set of equivalence classes $[W,f]$, denoted $\mathfrak{M}_3(BU(1))$, becomes an abelian group under the operation of disjoint union. The zero element is represented by the empty $3$-manifold. This group is a homotopy invariant, and so $\mathfrak{M}_3(BU(1))\cong \mathfrak{M}_3(\mathbb{C}P^\infty)$.

All of this is fairly standard, and can of course be generalised. A classic reference is Conner and Floyd's *Differentiable periodic maps*.

Eventually we see that Witten's claim is equivalent to the group $\mathfrak{M}_3(BU(1))$ being trivial. There may be more elementary ways to see this, but an algebraic topologist would use the following spectral sequence argument. Let $\mathfrak{M}_q$ denote the group of closed $q$-manifolds up to bordism (the same equivalence relation as above, but without the maps to $BU(1)$). These groups have been computed by Thom and others. All we need to know here is that $\mathfrak{M}_q\cong \mathbb{Z}/2,0,\mathbb{Z}/2,0$ for $q=0,1,2,3$.

There is a spectral sequence, called the *Atiyah-Hirzebruch spectral sequence* or the *unoriented bordism spectral sequence*, whose $E^2$-term is $E^2_{p,q} = H_p(BU(1),\mathfrak{M}_q)$ and which converges to $\mathfrak{M}_{p+q}(BU(1))$. Since $BU(1)\simeq \mathbb{C}P^\infty$ has homology concentrated in even degrees, we see that the groups $H_p(BU(1),\mathfrak{M}_q)$ are zero for $p+q=3$, and it follows that $\mathfrak{M}_3(BU(1))\cong 0$ as claimed.

The same argument works for oriented bordism, since the low dimensional oriented bordism groups are $\Omega_q\cong \mathbb{Z}, 0 , 0, 0$ for $q=0,1,2,3$. It also works for oriented rank $2$ real bundles, since $BSL(2,\mathbb{R})\simeq BU(1)\simeq \mathbb{C}P^\infty$.