Yes. It's been possible for a quarter of a century. What you are looking for is split horizon DNS service, and it is not done by fiddling with
/etc/resolv.conf. That configuration file dictates stuff to the DNS client library that is (usually) built into the C library that applications programs link to. That library is simple and does not do complex decisions like working out where to send different queries to based upon their question sections.
It's done by fiddling with the (machine-local or site-local) resolving proxy DNS server that the DNS client libraries are configured to talk to. In concrete terms: The
/etc/resolv.conf settings point applications to a resolving DNS proxy server listening on (say) a socket bound to the IPv4 address 127.0.0.1, and that server is configured, in ways that are specific to the server software, to enact query resolution in the appropriate way. That proxy DNS server, or even the content DNS server(s) that it in its turn talks to, is where all of the split-horizon mechanism resides.
- In ISC's BIND, this is done with conditional forwarding or with stub zones.
- In Daniel J. Bernstein's dnscache this is done with
- In dnsmasq, this is done in yet another way. As too systemd-resolved. And so forth.
So install one of these server softwares (Debian even having some of them pre-packaged) on your Debian machine, configure the DNS client libraries to use it, and configure it to do split-horizon DNS.