If it is a Movies Anywhere code...then Yes, so long as both your Amazon account and other retailer account are connected to Movies Anywhere, you can watch the movie on Prime Video. THIS IS BASED ON THE AMAZON WEBPAGE.
However, the digital copies can be from Sony, Paramont, and other places. These I am unsure if they would work on Amazon prime. Most do still work on Vudu. Which is what we use. You can login to the vudu account on most devices.