To show the statement to be true is the problem 19(d) of chapter 2 of baby Rudin.
And I saw a neat proof which is (possibly) intended originally by Rudin, judging by the partial problems (a), (b) and (c) which show that $A=\{q\in X:d(p,q)<\delta\}$ and $B=\{q\in X:d(p,q)>\delta\}$ are separated. ($X$ is the metric space (not connnected yet) we are working on, and $p,q\in X$, $\delta>0$.)
As in the post of the link, we can prove it without directly using the property of continuous function that preserves connectedness, or the Urysohn lemma. But nevertheless the context of the proof uses it, and it's simpler when we use it.
But the continuity first shows up at chapter 4 of baby Rudin, so I wanted to do it the other way. However my try contains errors and I don't know where they are. My argument is the following:
Suppose $X$ is a connected metric space. That is, for every subset $A\subset X$, $\overline{A}\cap A^c\not=\varnothing$ or $A\cap \overline{A^c}\not=\varnothing$.
$\overline{A}\cap A^c\not=\varnothing$ : Take $a\in\overline{A}\cap A^c$. Then $a$ is a limit point of $A$ and $a$ is not in $A$. Which implies that $A$ is not closed. It means that every nontrivial subset of $X$ is not closed, and not open.
$A\cap \overline{A^c}\not=\varnothing$ : Take $a\in A\cap \overline{A^c}$. Then $a$ is a limit point of $A^c$ and $a$ is not in $A^c$. Which implies that $A^c$ is not closed. It means that every nontrivial subset of $X$ is not closed, and not open.
Following any path, we end up with a weird space whose nontrivial subsets are nither closed, nor open. But I know that $\mathbb{R}$ is a connected metric space with open and closed nontrivial subsets.
I'm suspecting that the definition of connectedness I use is too strong, but it looks just what is written in baby Rudin.
And I couldn't even go further to countability. The plan was to get a contradiction when $X$ is countable. Is it doable in this way?
and empty $A \cap \overline {A^c}.$ – William Elliot Apr 29 '19 at 08:45