Pihole + Warp

Will such a scheme work in theory?
Internet provider->gate with Ubuntu with WARP->router->home network with Pihole as DNS