A cubic polynomial is reducible if and only if it has a factor of degree $1$, for if
$\deg c(x) = 3, \tag 1$
and
$c(x) = a(x)b(x) \tag 2$
with
$\deg a(x), \deg b(x) \ge 1, \tag 3$
and also
$\deg a(x) + \deg b(x) = \deg c(x) = 3, \tag 4$
elementary arithmetic forces precisely one of $\deg a(x)$, $\deg b(x)$ to take the value $1$, and the other $2$; without loss of generality we may take
$\deg a(x) = 1, \; \deg b(x) = 2; \tag 5$
with
$\deg a(x) = 1 \tag 6$
we may write
$a(x) = a_1 x + a_0, \; a_1 \ne 0; \tag 7$
then
$x_0 = -\dfrac{a_0}{a_1} \tag 8$
is clearly a root of $c(x)$:
$c(x_0) = a(x_0)b(x_0) = 0. \tag 9$
We have thus shown that a reducible cubic over $\Bbb Z_3$ has a root in that field; in fact, careful scrutiny of what we have done reveals this result holds over ant field $\Bbb F$; there is nothing intrinsic to $\Bbb Z_3$ in our argument. In any event, the question at hand may be simply resolved by evaluating $x^3 + 2x + 1$ at every element of $\Bbb Z_3$:
$f(0) = 0^3 + 2 \cdot 0 + 1 = 1, \tag{10}$
$f(1) = 1^3 + 2 \cdot 1 + 1 = 1, \tag{11}$
$f(2) = 2^3 + 2 \cdot 2 + 1 = 8 + 4 + 1 = 1, \tag{12}$
where all arithmetic is of course done in $\Bbb Z_3$; we see that $f(x) = x^3 + 2x + 1$ has no zeroes in the field $\Bbb Z_3$ and hence is irreducible.
In closing, I think it is only fair to point out that the basic result of this answer, that a reducible cubic polynomial must have a zero, is not always so easy to apply in practice; our advantage here is that $\Bbb Z_3$ has only three elements, ensuring that the amount of calculation is relatively small; over a field of large though finite cardinality, or over an infinite field, the amount of arithmetic required may become intracibly large. Nevertheless, the number of situations in which the present test may be efficiently applied is probably large enough to make it worth keeping in one's toolbox of polynomial "hammers".