Rather than calling finalize() by hand I want it to be called automatically after the guard gets dropped.
Is that possible?

I thought about creating a wrapper type around the RwLockWriteGuard and implement the Drop-trait. But the order would be wrong: First my object’s drop method would be called; then the guard would be dropped.

While ManuallyDrop is probably the correct path. Before that was in stable Rust an alternative was to store the MutexGuard as an option. Then in the drop for wrapper Option::take the guard out of the Option field and drop it either with a scope or std::mem::drop. That does make using the guard a bit harder since it needs to be matched or unwrapped to be used.