I think the result is true if $B$ is any connected $n$-dimensional submanifold whose boundary is also connected. That includes a closed $n$-ball. I'm assuming the manifolds and embedding are piecewise linear (PL), and that we're talking about path-connectedness rather than general connectedness.
Here's a proof. Consider a path $\gamma$ with endpoints in $M - B$. The intersection of $\gamma$ with $B$ is a disjoint union of paths $\sigma$, each with its endpoints in the boundary Bd $B$. Since Bd $B$ is connected, we can replace each $\sigma$ with a $\sigma'$ with the same endpoints which lies entirely in Bd $B$.
Now we want to push $\sigma'$ slightly away from $B$ so that it doesn't meet $B$ at all. Choose a small regular neighborhood $N$ of Bd $B$. $N$ is an $I$-bundle over Bd $B$, in which Bd $B$ embeds as a section and each fiber has one end inside $B$ and one end outside $B$. So the bundle is trivial, and we have an embedding $f: N \times [0, 1] \rightarrow M$ with $f(N \times \{0\})$ in the interior of $B$, $f(N \times \{1/2\}) =$ Bd $B$, and $f(N \times \{1\})$ outside $B$. In particular the obvious projection $f(N \times [1/2, 1]) \rightarrow f(N \times \{1\})$ is a retraction which pushes $\sigma'$ out of $B$.
Doing this for each $\sigma$, we get a path $\gamma'$ which doesn't meet $B$. QED.
It's not actually necessary for $B$ to be connected, as long as each of its connected components has connected boundary. So you can poke multiple holes in the original manifold and it will still be connected. Nor is it necessary for $B$ to be simply connected: it can be a solid torus, for example.
However, we do need that connected-boundary condition on $B$. For example, $\mathbb{R} \times [0, 1]$ as a subset of $M = \mathbb{R}^2$ is closed and simply connected, and it lies in the interior of $M$ because $M$ has no boundary, but removing that subspace divides $\mathbb{R}^2$ into two connected components.
I don't know about closed subsets in general, but I would bet that the result holds for any compact PL subset $B$.