Yes, it works. (You should state that it is $n$ you are taking the equivalence classes of-- you never actually stated that). If $n \equiv 0, 1 ,2 \mod 3$ then $n^3 -n \equiv 0-0, 1-1, 8-2 \mod 3$ respectively.
You can make it a tad more wieldy you could say $n\equiv -1, 0, 1\mod 3$ to get $-1+1, 0-0, 1-1 \mod 3$ respectively.
And that is fine. It does do everything a proof needs to do: it demonstrates irrefutably that the statement is true.
......
But 1) the text probably want a more intuitive, less brute force method and 2) for a more complex situation of a possibly high modulus such a proof may not be feasible or practical.
What they are getting at is to factor $n^3-n = n(n-1)(n+1)$. Those, $n, n+1, n-1$ are three consecutive integers so one of them must be divisible by $3$.
.......
Consider instead $n^7-14n^5 + 49n^3-36n$ and proving it is divisible by $5040$ is going to be impractical be brute force ($5040$ cases to check!) (Although a computer doing it would be an acceptable, albeit inelegant proof).
But factoring it as $(n-3)(n-2)(n-1)n(n+1)(n+2)(n+3)$ and noting it is a product seven consective integers so one of the terms is divisible by $7$, and least one is by $5$. Two are by $3$ and three are by $2$ with at least one by $4$. So $7*5*3^2*2*2*4=5040$ divides it.