Newton third law and collinearity of forces
Newton's third law comes in two versions:
The weak Newton's third law says that mutual forces of action and reaction are equal and opposite between two particles $i$ and $j$ at position $\vec{r}_i$ and $\vec{r}_j$, $$ \vec{F}_{ij}+\vec{F}_{ji}~=~\vec{0}.\tag{1}$$
The strong Newton's third law says besides eq. $(1)$ that the forces are also collinear, $$\vec{F}_{ij} ~\parallel ~\vec{r}_{ij},\tag{2}$$ i.e. parallel to the difference in positions $$\vec{r}_{ij}~:=~\vec{r}_j-\vec{r}_i,\tag{3}$$ or equivalently, act on the same line, as OP writes.
The weak Newton's third law is Newton's original formulation. The strong Newton's third law is a non-trivial additional assumption, cf. e.g. this Phys.SE post. If the strong Newton's third law holds, it often facilitates arguments. E.g. when applying D'Alembert's principle or Lagrangian mechanics to a rigid body, one can then ignore all the internal forces, which is an enormous simplification, cf. this Phys.SE post.
The third law arises from the conservation of momentum. If you apply a force $F$ for a time $t$ then the momentum change is given by:
$$ \Delta p = Ft $$
or if the force is a function of time:
$$ \Delta p = \int_0^t F(t')\,\mathrm dt' $$
Since momentum is conserved $\Delta p_A + \Delta p_B = 0$, and since the collision time is necessarily the same for both $A$ and $B$ that implies $F_A = -F_B$.
As for the colinearity, that is related to conservation of angular momentum. If the forces were not colinear there would be a non-zero torque and therefore the total angular momentum would change. Since angular momentum is a conserved quantity that implies that the two forces must act along the same line, not just along parallel lines.
If you have a large rigid body and you consider forces acting on it, then it's useful to define not only the direction of a force (as a vector), but also where it acts, the line of action. The result will be different if you push a body with the same force and in the same direction, but applying the push in different places. The mathematical abstraction used for it in some textbooks is "a sliding vector". Then generally speaking the 3rd law as applied to rigid bodies pushing/pulling on each other will have the lines of action not only parallel, but also on the same line. That's why some textbooks talk about "the same line of action". In particular I expect engineering-minded textbooks use this phrasing more often, because lines of action arise due to practical concerns of figuring out movement and equilibrium of real-world bodies.
On the other hand, pure-physics textbooks often present Newton's laws in a very fundamental, basic formulation where we deal only with point particles. Then "lines of action" don't really make sense, because a force acting on a point always applies at the point, and all you need to specify is the direction. Then the 3rd law always includes the fact that the forces are parallel, but the "strong form" of the 3rd law includes also that they're collinear in the sense of being also parallel to the line between the points (and therefore actually coinciding with that line as vectors, because they have no other choice, because they apply at the points). Your confusion is due to interpreting "collinear" as "same line of action", in the rigid-body framework above. But in this point-particle framework, "collinear" is used to distinguish between forces that coincide with the line between the particles, and forces that don't (but are still parallel), and it's misleading to talk about "lines of action".
To sum up:
- Talking about forces between rigid bodies -- lines of action -- 3rd law implies that contact forces act on the same line of action, but it's not usually called "collinearity" (although technically correct)
- Talking about forces between point particles -- no "lines of action" -- 3rd law in weak form doesn't include collinearity, in strong form does, and the part to emphasize about it is the fact that the forces coincide with the line between the particles (that fact will make their contribution to angular momentum, and not only momentum, vanish).