1) To make static files available to Node-RED web pages, you can simply configure a static folder.
If you look in your settings.js file (normally found in ~/.node-red), you will see a commented out property called httpStatic, set this to a suitable folder, e.g.:
httpStatic: path.join('', 'public'),
which would use ~/.node-red/public on a standard installation.
Your URL's would all be in the form: /images/myimage.png etc.
2) To call a function in one of the libraries, you need to create a suitable page. Assuming you are using http-in/out, you would use the template node to create your page. Slightly trickier if you want to use the Dashboard. But not by much, in that case, you will use the Dashboard Template node.
If you want to build more complex front-end apps, you might also want to look at node-red-contrib-uibuilder. This does the heavy lifting of creating folders and adding web resources along with managing the in/out messages between the back-end and the front-end.