I know I've read of folks fixing mbr with a GRUB Super Disc. You can download GSD off the internet.
Here's what you did to your computer. You installed Ubuntu with the external connected, and you let Ubuntu place GRUB Stage 1 where it goes by default. By default, GRUB Stage 1 installs to the very beginning of the bootable HDD, which in most people's PC's is the "C" drive.
Windows installs the Master Boot Record (MBR) to the beginning of "C" drive. If the MBR is corrupted Windows won't start. GRUB finds the Windows MBR and modifies it so that (1) you have the choice of operating systems, and (2) Windows will still start correctly.
So essentially you took the same risks as if you installed Ubuntu to the C drive. Well, OK, I take that back. You didn't have to deal with the partitioning part, which can be a handful.
So, yeah, first thing to do is fix the mbr. There are thousands of posts on that subject and I know you don't need a Windows disc.
Once you fix the mbr, Ubuntu will become unusable because GRUB Stage 1 has been erased. So here's a suggestion.
Most modern BIOS'es offer a feature that allows you to choose the bootable device during POST. There are several different keystroke combinations, depending on who designed your BIOS. If I remember correctly, it's F8 on my ASUS motherboard. All I have to do is tap F8 a few times at the right time and the "choose bootable device" screen pops up.
If you can find that feature, re-install Ubuntu to the external just like before, but watch for the window that asks you where to install GRUB. I haven't installed in months now, but if I remember correctly, the GRUB window came up AFTER Linux installed. There was a tiny box on that page. You can change the default setting (default will be hd0) so that GRUB Stage 1 installs to the external, not the internal drive. In other words, not one byte of Linux data will go to the Windows HDD.
I'm not absolutely sure about this, so it would be good to have someone back me up, but if you have one HDD inside the PC, your external drive should be recognized as "hd1" by GRUB. That would be the destination you enter into the "Where to install GRUB" page described above during the Linux installation process.
If you have two drives inside the PC, then the external should be hd2 in GRUB-speak. By "GRUB-speak", I mean that GRUB has its own terms for HDD's and partitions. You know how Windows sees HDD's or partitions as C, D, E, etc.? And Linux sees HDD's as sda, sdb, sdc, etc. and partitions as sda1, sda2, sda3? Well, GRUB sees HDD's as hd0, hd1, hd2, etc. and partitions as hd0,0, hd0,1, hd0,2, etc.
Yeah, I know, why can't this stuff be simpler?
I've never messed with a Super GRUB Disc, but I'm almost sure that it allows you to do numerous things, like fixing GRUB. Yeah, come to think of it, I'll betcha you could just re-install GRUB (which would involve installing Stage 1 again) to the external HDD using the GRUB Super Disc and not even mess with reinstalling Ubuntu!
EDIT: Super Grub Disc website: https://www.supergrubdisk.org/
BTW, physical HDD's are spelled "disk" and CD's, DVD's etc. are "disc"