This is true, with some points to clarify. First, you are presumably talking about surgery along a knot that generates the first homology (and hence fundamental group) of $S^1\times S^2$. Then the result of adding the corresponding 2-handle to $S^1\times B^3$ is contractible. The construction (called a `Mazur manifold') goes back to Mazur's paper, A Note on Some Contractible 4-Manifolds, Annals 1961.

The other point is that framing as an integer is not a priori defined for a knot that represents a homology class of infinite order. But fortunately the statement is true for any framing (as in choice of trivialization of the normal bundle). I'd suggest some basic reading about 4-dimensional handle calculus, as in the book of Gompf-Stipsicz.