Is it possible to use add_filter from a theme to alter a plugin’s function?

It is, but you’re doing this wrong. I’m not familiar with that plugin, but chances are it’s hooking into the wp_title hook. You should be able to a) call remove_filter() from your theme to disable the plugin’s title manipulation, and/or b) override the result returned by the plugin by plugging into the same hook (just make sure your “priority” is “higher”, i.e. your function gets called later).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)