This doesn't strictly answer your question, but I think the background information and context will be helpful.
The halacha (Jewish law) is that we can violate any torah law to save a human life except for three (murder, idolatry, sexual transgressions). If it were a matter of preserving life, then carrying something outside on Shabbat would be permitted. For example, if a doctor witnesses an accident and needs to fetch medical tools from his house to save someone's life, he does so, even though it involves carrying them through the public thoroughfare.
The prohibition of carrying applies when moving through, into, or out of a public domain. It doesn't apply within a building, for instance; you can carry that prayer book from the library to the sanctuary within the synagogue, no problem. It also doesn't apply within an enclosed space that is outdoors. There are laws about this so I don't want to just say "any fenced courtyard suffices", but it is possible for people who know what they are doing to construct a border such that the synagogue building and its lawn are all enclosed within a private domain. Within a private domain you can carry -- problem solved, if the synagogue has such an adjacent space.
This constructed boundary is called an eiruv (transliterations of the Hebrew vary). It need not be restricted to one building and its lawn. There is an upper size limit, but it's large enough that a good-sized neighborhood can be enclosed in an eiruv, allowing people to carry books, push baby strollers, and otherwise carry things from home to synagogue to the friends you're having lunch with etc.
Given all this, I don't think there's an issue with secular law interfering with religious observance in most locations at most times of year. If it's physically possible to meet outside, and if there exists some outdoor space adjacent to a building where the books can be kept, then it's possible to build an eiruv and use those books outdoors. (If the synagogue has no suitable outdoor space, there might be a need to use a congregant's backyard or something.)
There's one more consideration: praying in a community is very much preferred, but one who is unable to do so -- for example someone who is sick, or in quarantine -- may pray alone, omitting certain parts. Because of this, if the only way to pray in community were to violate a secular law about gatherings, I think the rabbis would rule that people must instead pray at home. Unless it transgresses Jewish law we follow secular laws; the principle is known as dina d'malchuta dina, "the law (of the land) is the law".
There might be one more consideration, but I haven't studied enough to say for sure. Before printing, people didn't have individual prayerbooks; there was a leader, who was responsible for doing it correctly, and people said "amein" at the right places and added their individual prayers. If a group were able to gather for prayer but could not bring books, it seems to me that it could revert to this approach so long as there's one person present who is qualified to lead.
I know I haven't answered the root question of whether Jewish law would allow violating a secular law that, as a side effect, precludes communal prayer. I think, given the flexibility already present in Jewish law to handle situations like this, it probably wouldn't come up. "But if it did?" That, unfortunately, I haven't answered.