The work-energy theorem holds for all forces, and one should always use vectors for derivations in mechanics not to get confused with directions of the involved quantities. As the most simple case we consider a single point particle moving under the influence of an arbitrary external force:
$$m \ddot{\vec{x}}=\vec{F}(t,\vec{x},\dot{\vec{x}}).$$
You get the work-energy theorem by assuming that ##\vec{x}(t)## is an arbitrary solution of this equation of motion. Then
$$m \dot{\vec{x}} \cdot \ddot{\vec{x}}=\dot{\vec{x}} \cdot \vec{F}[t,\vec{x}(t),\dot{\vec{x}}(t)].$$
The left-hand side is a total time derivative, because
$$m \dot{\vec{x}} \cdot \ddot{\vec{x}}=\mathrm{d_t}(m \dot{\vec{x}}^2/2)=\mathrm{d}_t T,$$
where ##T=m \dot{\vec{x}}^2/2## is the kinetic energy. Plugging this in the above equation and integrating over some time interval you get
$$T_2-T_1=\int_{t_1}^{t_2} \mathrm{d} t \dot{\vec{x}}(t) \cdot \vec{F}[t,\vec{x}(t),\dot{\vec{x}}(t)]=W_{12}.$$
The right-hand side is called work.
This law is not very helpful as it stands, because you need to know a solution of the equations of state. So it's just a nice observation to hold for any such solution, but it doesn't help much to find a solution.
This changes drastically for the special case that the force has a potential. Then the force shouldn't depend on time and velocity and there should be a scalar field ##V(\vec{x})## such that
$$\vec{F}(\vec{x})=-\vec{\nabla} V(\vec{x}).$$
Plugging this into the work-energy theorem you get
$$T_2-T_1=W_{12}=-\int_{t_1}^{t_2} \mathrm{d} t \mathrm{d}_t V[\vec{x}(t)]=-[V(\vec{x}(t_2))-V(\vec{x}(t_1))]$$
or
$$T_2+V(\vec{x}(t_2))=T_1+V(\vec{x}(t_1))=E.$$
This means that in this case for any trajectory the total energy ##E=T+V## is conserved, i.e., it doesn't change with time.
The important twist now is that ##W_{12}## does not depend on using the solution of the equation of motion to calculate the corresponding line integral, because if the force has a potential, then you can use any line connecting two points ##\vec{x}_1## and ##\vec{x}_2##. You always get
$$W_{12}=-[V(\vec{x}_2) -V(\vec{x}_1)],$$
i.e. you know without the solution of the equation of motion how energy conservation looks, and it can indeed help to find solutions of the equation of motion and that's why we call forces which have a scalar potential in the above given sense "conservative", i.e., you don't only have the work-energy theorem but the theorem of energy conservation, i.e.,
$$E=T+V=\text{const}##
along any solution of the equations of motion.