I believe yes. You can use Cloudflare with your Namecheap as domain registar and Dreamhost as your hosting provider.
You would need to:
Sign-up at Cloudflare to create Cloudflare account
Add your domain/website to your Cloudflare account
In the process, depending if you already have DreamHost or not, Cloudflare will try to scan your current DNS records and add them for you. If not, you can manually add them or even later. Furthermore, you will also be given the nameservers from Cloudflare
You would need to login to Namecheap interface and change the value under nameservers for your domain name and apply/save changes