Yes it is possible, but in an indirect way. Here is one method:
(I have to use screen shots to explain). Here is an example of
myModule whose body prints a message to the screen, but the body is hidden
This is done by making the implementation
foo in this case, be in a separate cell, then utilizing cell->cell properties feature to close the cell from view so it becomes hidden. The following two steps needs to be done:
The important point, is to have the implementation in a different cell to be able to close it. You can't close part of a cell. On a cell on its own. This can be easily extended for modules that take arguments as well.
To answer the comment on how to call own function in .m file from notebook. Please see these complete answers: How do I save a variable or function definition to a file? and How can I save and recall my own function?
The short answer, is that you can just do
<<myfile.m to load your .m file. Once loaded, then the definition is there in memory and you can then call functions defined in the .m file. The functions in the .m do not show up in the notebook, but they are loaded in memory. You can see them only when you do
? on them or type the .m file.