Reading the unbound documentation it should be possible, but not easy. Pi-hole understands EDNS(0)
information, eg. supplied subnet. (See Support for add-subnet option from dnsmasq (ECS/EDNS0 Client Subnet)).
Your unbound needs to be
built with EDNS client subnet support
Then you can enable the modules subnetcache validator iterator
and send-client-subnet