I must access the $db['default']['dbprefix'] variable from /application/config/database.php (CodeIgniter configuration file) from inside one in order to write my very own queries while using value in the file.

How is this done?

Try:

$this->load->database();
echo $this->db->dbprefix;

Normally you should use $this->config->item however i believe that only enables variables occur $config

The documentation states you ought to be using:

$this->db->dbprefix('tablename');

Does not make a lot of difference but happens to be an simpler syntax.