Step 1: Condition for a vector to lie in $W$.
A vector $\mathbf{v} = (x, y, z)^T$ lies in $W$ if there exist scalars $a$ and $b$ such that
\[
\mathbf{v} = a \begin{pmatrix} 0 \\ -1 \\ 2 \end{pmatrix} + b \begin{pmatrix} 2 \\ -1 \\ 0 \end{pmatrix}.
\]
Step 2: Write component-wise equations.
\[
\begin{cases}
x = 2b, \\
y = -a - b, \\
z = 2a.
\end{cases}
\]
Step 3: Substitute from given vector $(1, -1, 1)$.
\[
1 = 2b \Rightarrow b = \frac{1}{2}, \quad z = 2a = 1 \Rightarrow a = \frac{1}{2}.
\]
Now check $y = -a - b = -\frac{1}{2} - \frac{1}{2} = -1$, which matches the given $y$.
Hence, $\begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix} \in W$.
Step 4: Conclusion.
The vector $\begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix}$ lies in $W$.