My target is to put a domain under Cloudflare, this domain provides DNS for other URLs. I don’t care if the other URLs are or are not under Cloudflare protection.
In this case you simply add mydomain.com to Cloudflare, switch the nameservers for mydomain.com to Cloudflare as well, set subdomain to be proxied via Cloudflare but keep ns pointing to the original IP address of the nameserver responsible for the other domains.