It says in the Rambam that a Beis HaKneses (a special place for prayer which has many certain laws about it) is not required to have a "ma'akeh" (a fence on the roof). I believe the same is said in the Sifri.
(If someone can help with the exact sources then that would be better for the question.)
Does a "shul" or "shteibel" — the place where people go now to pray and learn, which doesn't have the same "sanctity" as a Beis HaKneses and where other things might be done (eating and drinking, getting together, meeting with people, etc.) — does it need a ma'akeh?