But I wouldn't.
Does your database have the ability to create constraints on it's data that would prevent the insertion of a leaf to a folder that is being deleted and is currently locked? It seems even simple row level locking should be able to do that. Just lock all the rows in the join table that have the id of the folder you're about to delete.
Or, maybe a foreign key / constraint could guarantee that you can't have a parent without a child (i.e. no NULLS allowed).
Does your dbms do either of those things? The first one seems a bit of work, and could get ugly if you've got recursive data and are deleting a huge giant structure. The locks could take quite a while to go on and come back off, and you might have to worry about someone who is currently adding something to a child sticking it right back in before the locks go in place, or it doesn't get noticed, and suddenly there are the few odd extra rows here and there.
So, I'd vote for the constraint.