a) You are referring a patch for dnsmasq.
If you want that applied, you'd have to submit that to dnsmasq via their official channels.
b) Pi-hole already has the ability to filter out DNS requests and block them based on their querytype via regex extensions since Pi-hole FTL v5.9, Web v5.6 and Core v5.4 released in September 2021.