Usually, to catch up with something, you have to do a very long matching trajectory as Rosetta is doing, but with Mars there with the comet, could you do a slingshot so as to have a probe ride with that comet--or at least do a flyby?
Under most circumstances, no. Comets on highly eliptical orbits have relatively high orbital velocities as they spiral inwards; boosting outwards to Mars puts you in a LOWER velocity with respect to the sun and takes much longer to do. IOW, it's a bit like jumping on a skateboard and trying to coast uphill to make a jump.
If you want to intercept something moving that fast, the better target is Venus, whose gravity is three times higher than Mars and is also lower in the sun's gravity well where potential energies are higher.