The function unaccent() is typically the one installed by the additional module unaccent. See:
Additional modules can be installed to any schema. (I like to use a dedicated schema.) See:
If so, then the schema must be added to the search_path to allow function calls without schema-qualification like you demonstrate.
The obvious explanation for your observation would be that you call the function in one session with an appropriate search_path, and execute the trigger in another session with a different search_path.
To diagnose, add this line to your PL/pgSQL trigger function just before the command calling unaccent() temporarily (and make sure notices are logged or reported to the client, depending on where you look):
RAISE NOTICE 'Current search_path: %', current_setting('search_path');
The simple & safe fix is to schema-qualify the function name. Like:
my_extension_schema.unaccent(text)
But investigate whether schemas and the search_path are handled properly across your DB cluster ...