Does the work-energy theorem assume that the particles of the system have time-independent masses? $\newcommand{\force}{\mathbf{F}}$
$\newcommand{\velocity}{\mathbf{v}}$
$\newcommand{\position}{\mathbf{r}}$
Here's an incomplete proof of the work-energy theorem:
$$W = \int_1^2\force \cdot d\position = m\int_1^2\frac{d\velocity}{dt} \cdot d\position = m \int_1^2 \velocity \cdot \frac{d\velocity}{dt} dt.$$
Allow $m$ to be time-dependent. Isn't it the case that the equation is not correct for $m$ and $\position$ both depend on time and thus $m$ is not allowed to be pulled out of the integral?
If we're unable to pull $m$ out of the integral then the work-energy theorem (presumably) doesn't hold when $m$ is time-dependent.
Edit: Please note the "Newtonian-mechanics" tag.
 A: Based on our discussion in the comments and chat, it looks like you are considering a situation where the mass is lost by the system in such a way that the forces on the system caused by the loss of mass cancels out, so all that matters is the net force acting on the object. Then Newton's second law has the form $$\mathbf F(t)=m(t)a(t)$$
Now, the work-energy theorem for constant mass systems is $W=\Delta K$ i.e. the net work is equal to the change in kinetic energy. But is this valid in our case? Let's say I see an object moving by me at a constant velocity. There are no external forces acting on the object, and it is emitting/absorbing mass in such a way that the change in mass doesn't change its velocity (as discussed above).
Now, this means that I see the object's mass changing with a constant velocity, which means it's kinetic energy must be changing. Yet there is no work being done on the object since there is no external force and the forces supplied by the change in mass cancels out. 
Therefore it must be concluded that the work energy theorem does not work for a variable mass system. The change in mass can add or remove energy without any work being done on the "main system". Of course this doesn't mean that energy conservation is invalid here. This just means our system isn't large enough. If you consider the mass that is entering or leaving system as well you will find that the total energy will remain constant. 
A: You are right. The correct version of work energy theorem states that the work done equals change in total relativistic energy and not just kinetic energy:
$W = \Delta(mc^2)$
Here m is not rest mass $m_0$ but the total relativistic mass $m$:
$m^2 = m_0^2 + P^2/c^2$
Where $P$ is relativistic momentum. If velocity is small compared to light the above theorem reduces to simple work-energy theorem. See Robert Resnick’s “Special relativity”.
