Notebook file / content handle access from imported module how to?

Use case:

User needs interactive help from module by running one line “import help from help \n help()”.
Module needs to extract content of the running ipynb where it was called and act on it. Return text and possibly make edits to the file.

How to get the path of the file?
How to get the active file handle or similar to read contents of the file before user hits save?
Is it possible to edit file back in real time (optional, returned text might be good enough)