Is it possible to clean install mac os and backup on the same drive in a different partition
Yes, it is possible, but I wouldn’t consider it safe. There are too many things that could go wrong.


When you erase the old system, you’ll need to be very careful to erase the old volume, not the entire drive. Exactly how you’d do that depends on how you’re doing the reinstallation.
If something goes wrong during the reinstall, it might get wiped out anyway.


So, if you don’t want to lose those files, you really should have them backed up (and verified) somewhere else. Actually, that’s true anyway, but it’s especially important when you’re doing something dangerous like a reinstallation.