Instead of erasing the partition, try the physical disk.
Your external drive was a Linux boot drive, which means it has a partition map that's not readable on your Mac. Since your Mac can't modify the partition map, it can't erase the drive.
That's why you must erase the physical disk instead because it resets your drive with a compatible partition map. Follow the steps below to eliminate the "Couldn't modify partition map" error on Mac:
- Open Disk Utility.
- Click View > Show All Devices.
- Select the topmost level of your external drive and click Erase.
- Choose a name for your drive.
- Select a proper file system.
- Set the partition scheme to GUID Partition Map.
- Click Erase.
Did it work? If you still can't erase your USB stick on Mac, keep trying the methods in this guide:
How to Fix 'Couldn't modify partition map' on Mac (69874 & 69803)?