What year MBPro do you have?
If it supports High Sierra, then, yes, you can install High Sierra, using your MBPro with your new drive in an external case. All you need to do is point the install to your external drive. (Prep the external drive first, by formatting a new drive as GUID, with macOS Extended (journaled) as the format. The High Sierra installer will automatically change the format to APFS, as a normal part of the system install.
When the install is complete, move the drive to the internal slot on the 2010 iMac, and try to boot from that...
You could make an attempt as an external drive to boot the iMac, but, I think, the best test is to boot from the internal SATA port
I continue to recommend that it would be a Good Idea™ to replace (or at least test) the button battery, as that
can be possible source of the occasional weird issue. Big job when you have to remove the logic board just to get at the battery, but would be one more thing to check off in the list of items that might cause boot issues.
** regardless of the opinions of a few others here, I totally enjoy "revitalizing" those (now) older Macs. In fact, I have a 2010 iMac that I use as a dedicated system with some software that will clear passwords, and do other hardware checks on used (android) phones of various brands. (not everything done on a Mac is about Apple
, but my now-old iMac continues to do what I ask of it.)