Given independent and identically distributed (not necessarily normal) random variables $X_1, \dots, X_n$ with unknown mean $\mu$ and unknown variance $\sigma^2$, the Central Limit Theorem states that the sample mean (equiv. sum) approximately follows a normal distribution. In particular, we have that $$ \frac{\bar{X}-\mu}{\sigma/\sqrt{n}} \sim \mathcal{N}(0,1) $$ as the sample size $n$ gets large. Armed with this knowledge, we can create a level-$\alpha$ confidence interval for the mean: $$ \bar{X} \pm z_{1-\alpha/2}\frac{\sigma}{\sqrt{n}} $$ where $z_{1-\alpha/2}$ is the appropriate quantile of the standard normal distribution.
However, this interval depends on the population value $\sigma$ (equiv. $\sigma^2$); when we observe a sample, we don't know this value. What we do observe is the sample variance $S^2=\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X})^2$, but my understanding is that $S^2$ doesn't follow a chi-square distribution unless the original $X_i$ came from a normal distribution (which is not part of our assumptions or else we don't need the CLT). So, we can't simply replace $\sigma$ with $s$ and $z_{1-\alpha/2}$ with $t_{1-\alpha/2;\ n-1}$ in our confidence interval.
My question is: how do we use the CLT to create a confidence interval if we don't know the population variance?
EDIT: In this question, one of the answers simply replaces $\sigma$ with $s$ and $z$ with $t$ like I mentioned above. Is this inaccurate? Central limit theorem with unknown variance