I would like to configure the firewall to block certain domains for a particular process. But these blocked domains should be available for use by other processes.
Linux firewall netfilter/iptables does not deal with domain names or URLs. It basically deals with IP addresses, protocols, and port numbers. Also, there are too many available modules you can use for different purposes.
If you are talking about HTTP traffic and you want to block some domains or URLs, a better option is to use HTTP proxy like squid. You can configure your client(s) to connect to this proxy or you can use it transparently. You can control who can access what. You can define ACLs in squid to control users access.