adding a guard rail to a flat roof
I would call a few fencing firms and have them give suggestions and pricing for a type of railing or fencing you like. The ones that have been in business for a long time have probably seen and installed any thing you can think of.