Here's an approach using the same basic thinking as modular arithmetic, without actually using modular arithmetic. Any three consecutive numbers will feature one number which is a multiple of $3$ (call it $3a$), one number $1$ greater than a multiple of $3$ (call it $3b+1$), and one number which is $1$ smaller than a multiple of $3$ (call it $3c-1$). Depending on the particular value of the first of the consecutive numbers, one or more of $a,b,c$ may be the same, but we don't need to rely on that here. We just sum the cubes of the three numbers.
Note that on the RHS, the $1$ and $-1$ cancel, so the remaining terms reduce to:
$9(3a^3+3b^3+3b^2+b+3c^3-3c^2+c)$, which has an explicit factor of $9$. QED