Nice example! One quick way is to wrap this in return and filtering on the array: https://surrealdb.com/docs/surrealql/datamodel/arrays#mapping-and-filtering-on-arrays
(SELECT id,age, <-parent_of<-(dog WHERE age > 5).* AS parents FROM dog WHERE age < 2)[WHERE parents];
WHERE parents goes into the parents field to see if it is truthy or not (truthy = not NONE, NULL, or an empty value).