Example 3 Try to determine all rational numbers $r$, such that the equation $r x^{2}+(r+2) x+r-1=0$ has roots and only integer roots.
(2002, National Junior High School Mathematics League)
Explanation: If $r=0$, then the original equation is equivalent to $2 x=1$. Thus, $x=\frac{1}{2}$. This contradicts the problem statement, so $r \neq 0$.
Let $x_{1} 、 x_{2}$ be the integer roots of the quadratic equation in $x$
$$
r x^{2}+(r+2) x+r-1=0
$$

By the relationship between roots and coefficients, we have
$$
\begin{array}{l}
x_{1}+x_{2}=-\frac{r+2}{r}=-1-\frac{2}{r}, \\
x_{1} x_{2}=\frac{r-1}{r}=1-\frac{1}{r} .
\end{array}
$$

From (2) $\times 2$ - (1), we get $2 x_{1} x_{2}-x_{1}-x_{2}=3$, which simplifies to $\left(2 x_{1}-1\right)\left(2 x_{2}-1\right)=7=1 \times 7=(-1) \times(-7)$.
Thus, we have
$\left\{\begin{array}{l}2 x_{1}-1=1, \\ 2 x_{2}-1=7 ;\end{array} \quad\left\{\begin{array}{l}2 x_{1}-1=7, \\ 2 x_{2}-1=1 ;\end{array}\right.\right.$
$\left\{\begin{array}{l}2 x_{1}-1=-1, \\ 2 x_{2}-1=-7 ;\end{array} \quad\left\{\begin{array}{l}2 x_{1}-1=-7 \\ 2 x_{2}-1=-1\end{array}\right.\right.$
Solving these, we get
$$
\left(x_{1}, x_{2}\right)=(1,4),(4,1),(0,-3),(-3,0) \text {. }
$$

Therefore, $r=-\frac{1}{3}$ or 1.