You probably need to use OUTER APPLY in this case:
SELECT TaskId,FromItemId, IHV_FROM.NodePath as FromPath
FROM VIEW_TASKS with (nolock)
OUTER APPLY fn_ITEM_HIERARCHY(FromItemId) IHV_FROM
WHERE ...
;
If the function always returns rows or if you only want results for values where the function does return rows, use CROSS APPLY instead.