Here is all I can remember. An alien race makes their ship look like a federation ship. The crew board it, discover it is not quite like it should be. The doctor is left there assisting. In the end the ship transforms back to how it was. That is all I can remember, my apologies, its been a long while.
Hope and fear is a good guess re: the ship... but not re: the EMH's part. It could be he's recalling "Live Fast and Prosper" or combining the two. http://en.memory-alpha.org/wiki/Live_Fast_and_Prosper_(episode) In LFAP aliens impersonate Janeway/Tuvok and conn people out of their money. In the end the EMH impersonates one of the impersonators. http://www.chakoteya.net/Voyager/621.htm
For bonus points, what was the Dauntless' registry number? (The answer should make your eyes go googly.)
I'd have to look that up, so it would be cheating. I just lucked out on the answer here, though it took a few seconds to remember the name.
Well hope and fear was the episode that had the alien ship, but I am still trying to find the one where the EMH beams over and I think he might have activated another ships EMH and solved the problem together. I sure has been too long. My memory has failed me.
Message in a Bottle. http://en.memory-alpha.org/wiki/Message_in_a_Bottle_(episode) It's possible to protect yourself, that you have created a world without Andy Dick.