I was recently studying centre of mass of a body and while studying the motion of the centre of mass it was stated that if no external forces act on a system the centre of mass remains stationary as the internal forces get cancelled out. Is there any situation in which the internal forces do not cancel each other out?
An internal force is a force exerted by one part of a composite object on another part. By Newton's Third Law, if part $A$ exerts a force $\vec F$ on part $B$ then part $B$ will exert an equal and opposite force $- \vec F$ on part $A$. These internal forces can move parts $A$ and $B$ relative to one another, but when you consider the object $A+B$ as a whole (represented by a point mass at the centre of mass of $A$ and $B$) the internal forces cancel each other out. So, yes, internal forces always cancel out when you consider the motion of the centre of mass.
If, in addition to the $\vec F$, $-\vec F$ pair, part $A$ also exerts a force $\vec G$ on an external object $C$, then $C$ exerts a force $-\vec G$ on $A$. If we now consider the forces exerted on parts $A$ and $B$, we have $\vec F$, $-\vec F$ and $-\vec G$. The internal forces $\vec F$ and $-\vec F$ still cancel, but now there is an unbalanced force $-\vec G$ which will cause the centre of mass of $A+B$ to move.
If we extend our composite object to now include part $C$ as well, then we have four forces acting on parts of $A+B+C$; they are $\vec F$, $-\vec F$, $\vec G$ and $-\vec G$. Now $\vec G$ has become an internal force, and there is no net force to affect the motion of the centre of mass of $A+B+C$.