There is no straightforward method to get this data.
Run the query to check the defaults:
SELECT
current_catalog() AS default_catalog,
current_schema() AS default_schema;
Catalog and schema may be changed in the query, so if you have query text you need to search whether "USE CATALOG" or "USE" were used. If no "USE" is in the text, you may assume that the defaults were used.