It's usually best not to put any more code than is strictly necessary in a config file. Further, if get_instance() isn't available, you're dealing with a config file that is loaded relatively early in the application's life-cycle (for example, config.php or routes.php), so you have to assume that a lot of CI's functionality won't be available.
What are you trying to do? In most cases there are other options, especially with HMVC.