Does wordpress allow me to add a php file to the root directory to execute custom scripts?
I need functionality similar to functions.php that you put into themes.
Are there any work arounds that don't involve modifying the config.php file?
WordPress can't prevent you from adding PHP files to the root directory, but there is no builtin functionality to load those files. You can load them yourself but if you are not careful they will load outside of WordPress context, which is a painful way to work.
What you want, almost certainly, is a plugin or a MU-Plugin. MU-Plugins work similar to what you are asking, if I understand you, but instead of placing your file in the site root you would place it in
I can't think of any valid reason why you'd want to do what you're proposing to do. Wordpress has many hooks that you can use to run code at virtually any stage. For example
Would essentially run everytime wordpress is called (Ie:, page loaded) allowing you to do whatever you want. That code can either be added into your themes function.php file, or even in a standalone plugin.
TLDR, there's really no reason why you'd ever need to run a script from wordpresses root directory.