If the drive of the Mac in Target Disk Mode is using the APFS file system and there is no free space available, then you will be unable to delete any files due to how the APFS file system works.
Maybe you can get lucky and see if there are any APFS snapshots on that drive which can be deleted which may free up the space needed. Here are a couple of articles about APFS snapshots, but the instructions will need to be modified slightly since you will be trying to delete APFS snapshots from an external drive (the examples assume you are accessing the boot drive).
View APFS snapshots in Disk Utility on Mac - Apple Support
https://eshop.macsales.com/blog/56681-working-with-macos-snapshots/
https://derflounder.wordpress.com/2018/04/07/reclaiming-drive-space-by-thinning-apple-file-system-snapshot-backups/
FYI, macOS always needs at least 20GB of free storage space at all times for the normal operation of macOS. Even that 20GB can quickly disappear during normal used due to temp & cache files utilized by the various apps.
You should always have frequent and regular backups of your computer and all external media (including the cloud) which contains important & unique data. You never know when it may be necessary to erase the whole drive to fix an issue (it may be the case here).