If the USB drive is simply write-protected as you discuss, you can switch its lock to another side for unlocking the write-protection. While I guess your USB hard drive is not write-protected but encounters other trouble instead.
Based on your failure to format the USB hard drive on Mac, you're suggested to format the whole physical USB drive rather than just a partition or volume. Select the USB drive in Disk Utility and click Format on the top menu, then wait for Disk Utility to finish the formatting.
If this format fails as well, then read the article for more solutions: Fix 'Couldn't open disk 69879' When Erase Process Has Failed