The linked question/answer does not contain an actual answer (in the case $n=2$), only a suggested strategy without an actual proof. There are several ways to argue. One is by reducing the problem to the Schoenflies theorem: Let $A\subset S^2$ be a (simple) topological arc (aka Jordan arc) with the end-points $p, q$. Take the 2-fold branched cover $\pi: S^2\to S^2$ ramified over the points $p, q$. Then $A$ lifts homeomorphically to two disjoint (simple) arcs $A_1, A_2\subset S^2$ with the end-points at $\pi^{-1}(\{p,q\})=\{x,y\}$. Thus, $C=A_1\cup A_2\subset S^2$ is homeomorphic to $S^1$, hence, by Schoenflies, there exists a homeomorphism $h: S^2\to S^2$ sending $C$ to a round circle $C'$. Take a chord $c'$ in $S^2$ connecting $h(x), h(y)$ and otherwise disjoint from $C'$. Then $h^{-1}(c')$ is a simple arc connecting $x, y$ and otherwise disjoint from $C$.
Now, take $\pi(c)=b$: It is a simple arc in $S^2$ connecting $p, q$ and otherwise disjoint from $A$. This is the arc you asked for. There are other arguments as well, for instance, using the Riemann mapping theorem: mapping the open unit disk $D$ via a conformal map $f: D\to S^2\setminus A$, taking a chord $c$ in $D$, mapping $c$ via $f$, and then using the Caratheodory-Torhorst extension theorem (without the need to use a branched cover) to argue that the open arc $f(c)$ extends continuously to the end-points.
Now, in higher dimensions, this is still true. The proof is a bit long and uses the fact that topological arcs in $\mathbb R^n$, $n\ge 3$ do not locally separate. See my Mathoverflow answer here. It is written for totally disconnected subsets but the proof is the same for (simple) arcs.