You can definitely do it. It's risky and you have to be very careful. Basically, you want to imply that it's your competitor's product without ever showing one of their images or mentioning their brand or product name.
The best way to keep you and your client out of the line of fire is to hint at the competition rather than openly addressing them. One of the best, most recent examples of this is ads created by competitors to the iPhone.
The iPhone 7 doesn't have a headphone jack, right? So companies like Google (when announcing the Pixel) say things like "and oh yeah it has a headphone jack too." This way they get to poke fun at the iPhone 7 without ever mentioning Apple or its specific product. It's a risk-free jab.
Now for an example with a picture. (I swear I don't have an issue with Apple.)
So here, you can see that they displayed the competition's product openly, but removed all of their branding (in this case, they didn't have to do much for that). However, everyone who is in the market for a smartphone knows that the phone on the left is an iPhone. (And "#iLost" clues you in if you weren't already getting it)
Basically, what I'm saying is that it can be done but you have to be very smart about it. Depending on where you are and how much your client wants to rip on the competition, you could be facing a slandering lawsuit if you're not careful.
If your client still insists on going ahead with using the competition's imagery, just make sure you don't lie about their product and its capabilities.
Additional note! Do not pull images off of the web unless you are certain that you have a right to use them in your own ad.