After spending hours into this, the problem came to: "how do I run execute a sql query in paris/idiorm and get the query result?"
Ididorm's raw_execute() doesn't return the query result but instead return true if the query was executed successfully and false otherwise.
In the end, I solved the problem with:
ORM::for_table('')->raw_query("SQL query to check for existence of the table")->find_one();
Instead of giving a table name as parameter for for_table(), I gave it an empty string then call a raw_query(), which is equivalent to just calling a raw query directly. It worked in my case. I also had to reset Idiorm's db connection and clear the cache for it to work when switching between different dbs.