7 is a Heegner number. Therefore the integer ring $O_K$ corresponding to $K=\mathbb{Q}[\sqrt{-7}]$ is a unique factorization domain. Now, it is easy to show that $\mathbb{Z}[\sqrt{-7}]\subset O_K$, i.e. $O_K \neq \mathbb{Z}$, because $x=\sqrt{-7}$ is a solution to $x^2+7=0$. On the other hand, $8=2^3=(1+\sqrt{-7})(1-\sqrt{-7})$. Why is this not a non-unique pair of factorizations? If $O_K=\mathbb{Z}[\sqrt{-7}]$, its pretty easy to show that $2$ and $1\pm\sqrt{-7}$ are not further factorable (resorting to the fact that the square of the modulus must be integral).
But even if we look at all $\mathbb{Q}[\sqrt{-7}]$, we can show that 2 cannot be factored except trivially.
Where am I going wrong????
Edit: "GH from MO"'s answer is really all you need. But, my second last line above, asserting "2 cannot be factored except trivially" - was wrong. All else above is correct. Last line was not wrong-headed though, the key was to look outside of $\mathbb{Z}[\sqrt{-7}]$, because $O_K$ is indeed larger.