The short answer is yes. The longer answer involves discussing “scope” which is a fundamental concept to programming in LUA especially.
If you place any functions inside of the scene:enterScene , scene:exitScene , etc. those functions are only accessible from within the scene method that the function is placed in (we assume all functions are local). If you want access to a function anywhere in your scene then you would declare it outside of the scene methods. If you want to access your function in any scene, or anywhere in your application, you would use a module.
This is a very short answer, and does not touch upon other details like forward-referencing, adding the function to the scene itself – which would allow you to use it in any scene method within the current scene, etc.
I recommend you search around for LUA articles that discuss scope. The sooner you understand it, the sooner you’ll be making the next killer app.
Hope that helps.
Cheers.