You have the right idea, but you got some signs wrong: $(x^3 + 1) = (x+1)(x^2 - x + 1)$.
So $x^2 - x + 1$ has a linear factor iff there exists an $a \in \mathbb Z_p$ such that $a^3 = -1$ but $a \
eq -1$.
Another fact that you may find useful is that the multiplicative group $\mathbb Z_p^\times$ is a _cyclic_ group. So there exists a generator $g \in \mathbb Z_p^{\times}$, and you can write any $a \in \mathbb Z_p^\times$ in the form $a = g^e$ for some integer $e$.
The order of $\mathbb Z_p^\times$ is $p-1$, and $(-1)^2 = 1$. So ask yourself: for what values of $e$ does $g^e = -1$? This should put you on the right track.