Your force balance is incorrect. There are two degrees of freedom in this problem: the displacements of the two masses $x_1$ of $m_1$ and $x_2$ of $m_2$, referenced about an equilibrium. Presented below is a general approach to finding the natural frequencies.
Consider a force balance on $m_1$. If $x_1 > 0$ while $m_2$ is fixed at an equilibrium location ($x_2 = 0$), then the spring will push $m_1$ to the left. So we have $m_1 \ddot{x}_1 = -k (x_1 - x_2)$. In the same way, if $x_2 > 0$ while $m_1$ is fixed at an equilibrium location ($x_1 = 0$), the spring will push $m_2$ to the left. So, $m_2 \ddot{x}_2 = -k (x_2 - x_1)$.
From this we obtain the linear system of differential equations
$$\begin{pmatrix} m_1 & 0 \\ 0 & m_2 \end{pmatrix} \begin{pmatrix} \ddot{x}_1 \\ \ddot{x}_2 \end{pmatrix} + \begin{pmatrix} k & -k \\ -k & k \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = 0$$
Multiplying through by the inverse of the "mass" matrix, we get
$$\begin{pmatrix} \ddot{x}_1 \\ \ddot{x}_2 \end{pmatrix} + \begin{pmatrix} \frac{k}{m_1} & -\frac{k}{m_1} \\ -\frac{k}{m_2} & \frac{k}{m_2} \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = 0$$
The squared natural frequencies are the eigenvalues of the matrix in the equation above. So, we diagonalize. For eigenvalue $\lambda$, the following is satisfied:
$$0 = |A - \lambda I| = \lambda^2 - k \left( \frac{1}{m_1} + \frac{1}{m_2} \right) \lambda $$
$$\implies 0 = \lambda \left( \lambda - k \left( \frac{1}{m_1} + \frac{1}{m_2} \right) \right)$$
This shows that $\omega^2 = 0$ is one natural frequency and $\omega^2 = k \left( \frac{1}{m_1} + \frac{1}{m_2} \right) = \frac{k (m_1 + m_2)}{m_1 m_2}$ is another. The first case indicates the presence of a rigid-body mode - indeed, the center of mass of the system is not fixed, so the system is free to arbitrary translation. The other case is the desired result.