I don't really see a shortcut here. If it were me, I would tear the rubber roof surface off and structurally support the perimeter framing properly before attaching the rail so that it will accommodate loads per code requirements, then reinstall EDPM membrane, proper sloped sleepers and flooring over the roof.
"With the standard safety factor of 2.5 used by engineers, that means railing and posts must be designed to resist a 300-pound uniform load or a 500 pound point load. The main concern is a push outward from people leaning against the railing. Few older deck railings can meet this requirement, but building inspectors and professional deck builders are starting to pay more attention to this critical detail. Even if you can squeak by with a weaker railing, do you really want to?"
The excerpt above is part of a larger detail here - https://buildingadvisor.com/materials/decks-porches/building-deck-railings/
First, find out your local code requirements. I'd also make sure the flashing systems, joist tape and caulking is done properly as a part of the rebuild.