"Rule body (IF) and only rule body may optionally contain UNION, BIND or
FILTER clauses. However, functions EXISTS, NOT EXISTS, or NOW() cannot be
used in rules. User-defined functions (UDF) may be used in rules but if the
UDF is not a pure function https://en.wikipedia.org/wiki/Pure_function
then the results are undefined.
Other SPARQL features are not allowed in rules."
I believe what you're looking to do would be covered under "Other SPARQL
features".