The principle of conservation of linear momentum can be strictly applied during a collision between two particles provided the time of impact is
Extremely small
By the definition of collision, there is no exernal force acting on the bodies colliding. All the forces are purely internal in nature. Hence Momentum of the system remain conserved. Also the time taken for a collision is extremely small.