Example 12 Find the value of $k$ that makes the roots of the equation $k x^{2}+(k+1)$ $x+(k-1)=0$ integers.

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.
Solution: Discuss in two cases, $k=0$ and $k \neq 0$.
When $k=0$, the given equation is $x-1=0$, which has the integer root $x=1$.
When $k \neq 0$, the given equation is a quadratic equation.
Let the two integer roots be $x_{1}$ and $x_{2}$, then we have
$$
\left\{\begin{array}{l}
x_{1}+x_{2}=-\frac{k+1}{k}=\cdots 1-\frac{1}{k}, \\
x_{1} x_{2}=\frac{k-1}{k}=1-\frac{1}{k} .
\end{array}\right.
$$

Subtracting (2) from (1) gives
$$
\begin{array}{l}
x_{1}+x_{2}-x_{1} x_{2}=-2 \\
\Rightarrow\left(x_{1}-1\right)\left(x_{2}-1\right)=3 \\
=1 \times 3=(-1) \times(-3) . \\
\text { We have }\left\{\begin{array} { l } 
{ x _ { 1 } - 1 = 1 , } \\
{ x _ { 2 } - 1 = 3 ; }
\end{array} \quad \left\{\begin{array}{l}
x_{1}-1=-1, \\
x_{2}-1=-3 ;
\end{array}\right.\right. \\
\left\{\begin{array} { l } 
{ x _ { 1 } - 1 = 3 , } \\
{ x _ { 2 } - 1 = 1 ; }
\end{array} \left\{\begin{array}{l}
x_{1}-1=-3, \\
x_{2}-1=-1 .
\end{array}\right.\right.
\end{array}
$$

Thus, $x_{1}+x_{2}=6$ or $x_{1}+x_{2}=-2$, i.e., $-1-\frac{1}{k}=6$ or $-1-\frac{1}{k}=-2$.
Solving these, we get $k=-\frac{1}{7}$ or $k=1$.
$$
\text { Also, } \Delta=(k+1)^{2}-4 k(k-1)=-3 k^{2}+6 k
$$
+1, when $k=-\frac{1}{7}$ or $k=1$, we have $\Delta>0$.
Therefore, the values of $k$ that satisfy the requirements are
$$
k=0, k=-\frac{1}{7}, k=1 .
$$