and how do i do if you plan to return to your home country and need my foreign driver's license
In that case ask the test drive examiner how to make sure your foreign driver's license is not destroyed.
If I come to visit and have a license from another nation?
If you have a driver's license from any nation, you don't need a New York State license to drive in New York State. You should only apply for a New York State driver's license if you become a New York State resident.