Let $M$ be a smooth c connected $m$-manifold, $N_1$, $N_2$ two smooth disjoint connected $n$-submanifolds with boundary, both contained in the interior of $M$ (if necessary). Assume that $M\setminus (N_1\cup N_2)$ is still connected. I would like to do a "boundary connected sum of $N_1$ and $N_2$ in $M$"; that is, cat out small $(n-1)$-discs in $\partial N_i$ and attach $B^{n-1}\times B^1$ that connects $N_1$ and $N_2$ and get a smooth connected submanifold. While such a construction is described in, for example, Kosinski's Differential Manifolds for the case of abstract $N_1, N_2$, how can I do it if I want the resulting connected manifold to be a smooth submanifold of $M$?
If it helps, I can assume that I have a framing of the normal bundles of $N_i$ in $M$.

As pointed out in the comments, the resulting manifold will depend in general on the path chosen to connect $N_1$ to $N_2$.
Choose a point $x_i\in N_i$ for $i=1,2$ and an embedded arc $\alpha$ connecting $x_1$ to $x_2$ in $M\setminus(N_1\cup N_2)$. The arc $\alpha$ has a regular product neighborhood of the form $\alpha\times D^{m-1}$ whose endpopint-disks, that i denote by $D_1^{m-1}$ and $D_2^{m-1}$, contains smaller disks $D_1^{n-1}$ and $D_2^{n-1}$ on $\partial N_1$ and $\partial N_2$. You can now chose a strip-section $\gamma$ of the form $\alpha\times D^{n-1}$ and attach it to $N_1\cup N_2$ along $D_1^{n-1}$ and $D_2^{n-1}$.
This is the connected sum of $N_1$ and $N_2$ along $\gamma$. As said it depends on $\gamma$.
To make the construction smooth, is enough to do in in local coordinate charts $X_1,\dots, X_m$ near $x_i, i=1,2$.
There you have that locally $N_i$ correspond to $\{X_{n+1}=\dots=X_m=0, X_n\leq 0\}$ and you can arrange things so that $\alpha$ corresponds to the $X_{n}$-axis.
In such coordinates the smoothing is easy: just do it for $n=2$ and then extend in a rotationally symmetric way.
As for the in/dependence on $\gamma$, note that if you are in codimension at least $3$ then any $\alpha$ and $\alpha'$ as above are isotopic (provided the $N_i$ are connected, otherwise will depend on the connected compoents where the $x_i$ belong). This is because there is enouch room in $\mathbb R^{m+3}$ for separating $R^m$ from a line, so one can resolve easily evetual crossings.
EDIT: The above sentence is not formally correct. To be more precise, once you chose an arc $\alpha$ then you can move the points $x_i$ where you want, but the dependence on the homotopy class of $\alpha$ in $M$ still is in play.
Finally, if the codimension is at least $2$ then any two strip-section $D^{n-1}\times [0,1]$ in $D^{m-1}\times [0,1]$ are isotopic. Indeed a strip-section is given by $n-1$ linearly independent sections, that we may ortonormalize. Given two such sections $(s_1,\dots,s_{n-1})$ and $(s_1',\dots,s_{n-1}')$ we can isotope $s_1$ to $s_1$ because $S^{m-2}$ is simply connected. The isotopy of $s_2$ now take place in $s_1^\perp$, thus in $S^{m-3}$. And so on. For the last isotopy we need $S^{m-1-(n-1)}=S^{m-2}$ simply connected, hence $m-n\geq 2$.
In the comments I see that the right codimension is at least $4$. So I may have been confusing with indices and notations, but this is easily checked.