Let $X$ be a smooth $n$-manifold, with $n\ge 3$, such that $\pi_1(X)=\left<a_1,\ldots,a_m\right>$ (free group over $m$ elements) and suppose that there is an embedding: $$S^1\times D^{n-1}\subset X$$ where $S^1$ is the circle and $D^{n-1}$ in the closed disk of dimension $n-1$. Why do we have the following equality?
$$\pi_1(X)=\pi_1\left(X\setminus\text{int}\left(S^1\times D^{n-1}\right)\right)$$
Clearly with $\text{int}(\cdot)$ I mean the internal part of a topological space.
Your space is a deformation retract of the space $X \setminus (S^1 \times 0)$. So it's obtained by deleting a manifold of dimension 1. By invoking transversality theory, deleting a submanifold of codimension at least three does not change the fundamental group. (You should try to prove this yourself; if you can't, I've given answers with a proof of that on this site before.)
So the answer to your question is: it doesn't work as stated; in particular if the loop is not null-homotopic in a 3-manifold. As a particular example, take the obvious circle in $S^3$; its complement deformation retracts onto a circle, so has fundamental group $\Bbb Z$. However, your result is true of the manifold is dimension at least 4.