You can, but you would want to be careful. If using a VPN client on a client device (PC / Phone), this would leak DNS queries and make analysis far easier to conduct.
Alternatively, you could configure your router so that all egress traffic traverses the VPN. This would mean that DNS queries to external resolvers would also go out over the VPN link!