Yes. I've served the exact same code/files from multiple AppPools for years; it works fine.
But all instances will read web.config identically since Microsoft's standard functionality wasn't written to do what you're trying to do. So you will have to implement your own custom solution for determining what instance the code is running under and choose the appropriate configuration variables based on that. You could either store your config data in a custom config section within web.config (defined in "configSections") or have a separate .config file somewhere else.
What I usually do is switch the code's behavior based on the path to the IIS Application it's running under (i.e. the path). E.g. if the site is being served up under "/example1", I pick one set of config data, and if it's served up under "/example2" it gets another set. (Note that you'll also want to handle the config for the Dev Server's URL when you're running your site through VisualStudio.)