It's alright that Disk Utility won't fix APFS volumes if they have mounted Time Machine volumes on them. That's because when Disk Utility First Aid is checking and repairing the volume, it will lock it first. However, Time Machine keeps syncing files to the Time Machine backup volume, leading to the APFS volume not being locked. So, Disk Utility fails to repair the volume but alerts you to reformat it.
You can try un-mounting the Time Machine volume from Disk Utility and then run First Aid to check the unmounted APFS volumes. If Disk Utility fails to fix the unmounted APFS volume, you have no choice except to reformat it. This process will erase data on it, just as you say. To avoid data loss, you can use data recovery software like iBoysoft Data Recovery for Mac to recover files from the unmountable drive first.