All manifolds considered here are compact and orientable. A 3-manifold (with possible boundary) is *irreducible* if any smooth sphere bounds a ball. Note that a closed irreducible 3-manifold is prime, and a closed prime 3-manifold is irreducible unless it's $S^1\times S^2$.


Suppose I remove a collection of thickened loops $S^1\times B^2$ from a closed 3-manifold $M$, forming a 3-manifold $Y$ with (possibly disconnected) 2-torus boundary. Or suppose I plug up such a $Y$ into a closed $M$.


**Is there any relation between (ir)reducibility of $Y$ and $M$?** When can I expect an irreducible (respectively, reducible) $M$ to result in an irreducible (respectively, reducible) $Y$?


I see that the irreducible $S^1\times D^2$ plugs up into the reducible $S^1\times S^2$. I also see that if I take a connected sum $M$ (reducible) and remove an $S^1\times D^2$ that cuts through the neck then, possibly, the resulting $Y$ is irreducible. I also see that if I take an irreducible $M$ and remove some thickened loops in a small ball, the resulting $Y$ is a connected sum of $M$ with a thickened link complement in $S^3$.



Irreducibility of 3-manifolds with (non)empty boundary
You're asking how reducibility/irreducibility behaves under drilling and [filling](https://en.wikipedia.org/wiki/Dehn_surgery). I think you've captured the essence of drilling: if a link is "sphere busting" in a reducible manifold (meets every essential sphere up to isotopy), and doesn't have components lying in a ball, then drilling it will be irreducible.


E.g., if a compact 3-manifold $M$ is reducible, then its fundamental group is a free product. Suppose one has a knot in $M$ such that the conjugacy class it represents in the fundamental group is not conjugate into any factor of free product (this is referred to as "algebraically disk-busting" in certain contexts). Then drilling this knot will yield an irreducible 3-manifold.


On the other hand, as Marco Golla indicates in the comments, determining reducibility of Dehn fillings is trickier. For any given example, it is possible to determine, since reducibility is algorithmic for 3-manifolds. On the other hand, one would like classifications of reducible fillings, which is one of the goals of the exceptional Dehn filling cottage industry. A well-known conjecture is the "Property R" conjecture, which states that 0-framed surgery on a knot cannot give $S^2\times S^1$. In Gabai's proof, he actually showed that 0-framed surgery is irreducible. The cabling conjecture would imply that the only knots with reducible Dehn fillings are the non-trivial cables (with reducible slope given by the slope induced by the knot in the cabling torus). This is still a topic of active research.


Check out this paper and papers citing it.


*Gordon, C. McA.; Luecke, J.*, [**Reducible manifolds and Dehn surgery**](http://dx.doi.org/10.1016/0040-9383(95)00016-X), Topology 35, No. 2, 385-409 (1996). [ZBL0859.57016](https://zbmath.org/?q=an:0859.57016).


Also see [Cameron Gordon's survey "Dehn surgery and 3-manifolds"](http://www.ams.org/books/pcms/015/) which lists what is known about knots that have a reducible Dehn filling and some other special filling (such as finite fundamental group or toroidal).


