That will work. C++ can return a local struct variable. In this case, it will be done with a simple shallow copy. A struct with dynamically-allocated memory (an Arduino String variable for example) would require a proper copy (or move) constructor.
The (more efficient) alternative is to pass the struct variable FROM the calling function INTO myFunc() by using a C++ reference. myFunct() would then operate on that variable directly even though it "belongs" to the calling function.
The latter of these seems better to me.