By the very nature of paths of unbounded variation (such as those of Brownian motion), an expression such as $dW_t$ must be interpreted in integral form. In other words, when someone writes an expression of the form
$$dX_t = b dt + \sigma dW_t, \quad t \geqslant 0,$$
what they really mean is
$$ X_t - X_0 = \int_0^t b ds + \int_0^t \sigma dW_s, \quad t\geqslant 0.$$
The differential notation is shorthand for the integral form and is defined to be the process $X_t$ which satisfies the integrated form in a suitable sense.
To answer your question, you can do either. That is, you can compute the integral $\int_0^t (W_s^3 - 1) ds$ directly, and then apply Itô's formula when applying the differential (as you must do with the $W_t^2$ term). However, if all you want is to write the process in differential form, there is no need to do this. Indeed,
\begin{align*}
d(X_t) &= d(W_t^2) + (W_t^3 - 1)dt \\
&= 2W_t dW_t + dt + (W_t^3 - 1)dt \\
&= 2W_t dW_t + W_t^3 dt.
\end{align*}
Again, in the above, the first equality only makes sense because
$$W_t^2 - W_0^2 = \int_0^t 2W_s dW_s + \int_0^t ds.$$