There is no simple general answer
Unfortunately there is no general way of testing for conditional independence that would work reliably for any function. In practice you probably have to restrict yourself to a certain class of functions and choose from available independence tests for that function class (e.g. using something like this).
(Conditional) Mutual Information may be your best bet
Another approach that may be closest to what you have mind is using conditional mutual information. The downside is that mutual information can be extremely difficult to estimate. Nonetheless, the Multivariate Information based Inductive Causation (MIIC) method is making use of this approach and their results are quite good as far as I am aware, and there are even a few extensions.
Keep in mind the extrapolation problem
Another thing that may be relevant for you: The assumption of linearity not only makes conditional independence testing easier, it also provides a simple way of extrapolating outside the given support. If the functional dependency between variables could be anything, knowing the causal structure might not give you the answers you're looking fore because one would still not know what effects to expect for interventions outside the support due to the extrapolation (or interpolation) problem.