Is it possible to set the database file dynamically using a property in the input message? The directory holding my SQLite database may change.
I do not think that is possible.
Depends which of the sqlite nodes you are using.
If you search on flows.nodered.org you will find
https://flows.nodered.org/node/node-red-contrib-queued-sqlite
which would appear from the README to do what you want.