I will try to leave this message for those who also encounter a similar error.
My project used writing and reading datasets. I set the following options for these datasets:
qryMasterSelect.Options:= Options + [sqoAutoCommit, sqoKeepOpenOnCommit];
I was getting the same error when I tried to programmatically close the DB connection after connect/disconnect more than 1 time. It didn't depend on the bitness of the library used sqlite3.
As a result, I found a workaround. I began to programmatically create/destroy SQLite3Connection during connection/disconnection, respectively.
Perhaps my experience will be useful to someone.