Suppose I have two rigid bodies A and B and they are connected by a spring which is attached off-center (thus possibly causing torques). Due to the spring a force $f$ acts on A and a force $-f$ acts on B (at the respective attachment points) in direction of the spring as in Fig. 1. How can I show the conservation of momentum? $\frac{\rm d}{\rm dt} p_A + p_B = 0$ (where $p_A$ and $p_B$ are the linear momenta of A and B respectively) is missing the angular part and $\frac{\rm d}{\rm dt} p_A + p_B + L_A + L_B = 0$ (where $L_A$ and $L_B$ are the angular momenta of A and B around their center of masses respectively) seems to be wrong. Is $\frac{\rm d}{\rm dt} p_A + p_B + L_A^0 + L_B^0 = 0$ (where $L_A^0$ and $L_B^0$ are the angular momenta of A and B around the origin respectively) the correct ansatz?
What if the forces are opposite but not in the direction of the spring as in Fig. 2?

Fig. 1: Opposite forces along the line between the points where the forces act.

Fig. 2: Opposite forces but not along the line between the points where the forces act.