In a way, yes. A VPN can't block ads by itself, but many good VPNs, like VeePN, come with their own ad-blocking tools that you can turn on manually. These tools can even block YouTube ads. You might still see the ad container for a couple of seconds, but then the video will play without any interruptions.