What is certainly untrue is that a topological space is connected if and only if it is compact. This is untrue even for subsets of the real line: consider $(0,1)$ and $[0,1]\cup[2,3]$, for instance.
If $X$ is some fixed topological space, then there isn't much content to the statement 'if $X$ is not compact then it is not connected'. Either $X$ is connected or it is not, and either $X$ is compact or it is not. As TheSilverDoe points out, $(0,1)$ is not compact but connected, so the implication is false in this case.
What the linked answer shows is that you can use compactness of $[0,1]$ to prove connectedness of $[0,1]$ and vice versa; however, this proof makes essential use of the whole structure of $[0,1]$, including the fact that it has 'endpoints'. It would be useful for you to go through the proof deriving compactness of $[0,1]$ from its connectedness and see why it fails for $(0,1)$.