You have to pull the window and seal. If you can clean it with a wire wheel and some rust converter, and there's still good steel, then you can fix it with some body filler and a repaint. If you've got pinholes or extremely thin sections, you're going to have to have a patch panel welded in or find a hatch in better condition.
If you want to half-ass it, you can push some cord under the seal to keep it out from the body, clean up what you can, rust-convert what you can, and follow with body filler and rattle can paint. If you shoot enough fluid film under the seal afterwards then *maybe* it won't rot out right away.