To supplement @Omnomnomnom's answer, I have worked out calculating the dimension of the vector space below.
The dimension of a vector space is defined as the number of elements (i.e: vectors) in any basis (the smallest set of all vectors whose linear combinations cover the entire vector space).
In the example you gave, $x = -2y$, $y = z$, and $z = -x - y$. So,
$$
\begin{align*}
\begin{pmatrix}x\\y\\z\end{pmatrix} &= \begin{pmatrix}-2y\\z\\-x - y\end{pmatrix}
\\&= \begin{pmatrix}-2z\\z\\-x - z\end{pmatrix}
\\&= \begin{pmatrix}-2z\\z\\z\end{pmatrix}
\\&= z\begin{pmatrix}-2\\1\\1\end{pmatrix}.
\end{align*}
$$
Thus, we can say the vector space under the conditions you gave is given by $\left\{ x \begin{pmatrix}-2\\1\\1\end{pmatrix} : x \in \mathbb{R} \right\}$ (i.e: the linear combinations of the vector $(-2, 1, 1)$; in this case, since there's only one vector, linear combinations are simply multiples of that vector).
So, the basis of this vector space is $\left\{ \begin{pmatrix}-2\\1\\1\end{pmatrix} \right\}$. There is only one vector in the basis, so the dimension of the vector space is $1$.