One should be able to Erase any drive you're not booted from.
Hopefully that is all logical and straightforward, at least until we come to APFS. If you use the same diskutil list command on a Mac with a single internal APFS disk with a single user volume on it, you’ll see that things have become more complex. Your single disk, /dev/disk0, now has a “synthesized” twin /dev/disk1...
On /dev/disk0, there is a basic partitioning, in addition to the GUID partition map:
- disk0s1, the small EFI partition as before, although it is here over 300 MB;
- disk0s2, an APFS Container named disk1, with the main storage space.
The ‘synthesized’ /dev/disk1 then contains the important partitions, after an APFS Container Scheme which functions a bit like a partition map:
- disk1s1, the main storage volume, which is given its actual size, not its maximum capacity;
- disk1s2, the small Preboot volume, just over 20 MB;
- disk1s3, the ‘hidden’ Recovery partition of just over 500 MB;
- disk1s4, a VM partition of 1 GB or more, which is mounted at /private/var/vm to provide virtual memory.
The Preboot volume is new with macOS systems booting from APFS disks, and contains the EFI boot file, which was previously provided in the System volume. If you mount and examine it, you’ll see that it contains one or more folders named using UUIDs. Each of these corresponds to an associated System volume within that APFS Container, so allowing a single APFS Container to hold multiple bootable systems, each with its own EFI boot file, etc.
When you’re running High Sierra or later, you have another command option which provides even more information about your disks and their volumes:
diskutil apfs list
https://eclecticlight.co/2018/08/01/disks-partitions-volumes-containers/