UNDIRECTED HAMCYCLE to HAMPATH reduction
No. Since you are performing a many-one reduction, you have no capabilities beyond the model you are using for the reduction, in this case a poly-time Turing machine. Queries to the problem you are reducing to are only allowed if you are performing a Turing reduction, but that is a different notion and (strictly) more powerful than a many-one reduction (and is not what is used when establishing NP-completeness).

Of course, the line would be allowed if you managed to prove HAMPATH is solvable in polynomial time. I don't think you will be able to.