Using the cmdlet Add-WfaWorkflowParameter to add return parameters is slightly different than the other ways return parameters can be specified. When this cmdlet is used in a command the parameter gets added only during the execution of the workflow and not during the planning of the workflow. Evaluation of expressions happens during the planning of a workflow. Parameters which are added like this cannot be used in expressions which are evaluated during planning.
But you could add the cmdlet Get-WfaWorkflowParameter in a subsequent command to get the parameter that was added before.
The first part of what you did is correct, about adding it in the command. You dont need to add a return parameter called "path" after that. The planning fails because this parameter isn't available till the workflow starts executing. So after the workflow execution is over if you check the Execution Status you will see the parameter "path" appear automatically. The return parameters can be obtained by calling the rest api