Short answer: No.
Longer answer: Maybe once, sorta; but now, not really, no.
It doesn’t matter where the apps are stored, the preference files are always stored in the same place
There was an app called "SwitchUp" (originally "rooSwitch") that was designed to let you easily switch between multiple sets of preferences. Its homepage says that it is no longer in active development, which I assume means that it may no longer work, and may not even be for sale anymore.
However, the concept was basically this:
- Find "the preferences files and related data" (let's call this a "profile" for short) for an app, and, when asked, hide it away somewhere.
- Allow the user to create a new profile or duplicate an existing profile.
- Let the user then switch between profiles #1 and #2 (or #3, #4, etc) whenever they want.
The key, of course, was that you could only switch "profiles" (I think that's what they were called) when the app was not running. And if you launched the app and realized you had the wrong set of preferences, etc. you would have to quit the app, then launch SwitchUp, then change the profile, then launch the app again.
It has never been possible (as far as I am aware) to run two copies of the same app at the same time.
I assume that one of the reasons why SwitchUp is no longer being developed is that it became more and more difficult to accomplish that task. Originally it might have just been a preference file and possibly a folder in ~/Library/Application Support/"your app name here"/. But now there might be iCloud data, and "Containers" inside the ~/Library/ folder which are not very amenable to this type of "profile switching".
Is it possible that you might be able to make something like that work with some Mac application? Yes. Assuming you can identify all of the "profile" data, and found some way to move it aside and store it in a retrievable manner later on, you might be able to make it work to have two different sets of app data that you cannot use simultaneously.
But I wouldn't recommend trying it, because I think it's fraught with peril and almost inevitably bound to end in sadness.