Problem: Let $R$ be an integral domain with fraction field $K$. Assume that $x \in R$ or $x^{-1} \in R$ for all $x \in K^{\times}$. Prove that $R$ is a local ring (the ring $R$ is said to be a valuation ring of $K$).
Attempt: I don't really know how to begin. There a different possibilities to show that $R$ is a local ring. Either showing it has a unique maximal ideal, or showing that $R \setminus R^{\times}$ is an ideal, or that the sum of two non-units is a non-unit.
I take $r \in R$ and $x \in R \setminus R^{\times}$. I want to show that $rx \in R \setminus R^{\times}$. I can consider $rx$ as an element in the fraction field $K$. Then either $(rx)^{-1} \in R$ or $rx \in R$. But the second is trivial. So I'm not really sure how to use my assumption.
Any help is appreciated.