In residential VoIP service terms, you are looking for a “Bring Your Own Device” softphone option, with call forwarding or a ring list. On the Librem 5, you will run a SIP client for the BYOD option, and call forward to the phone number on the Librem 5’s modem. If you use a simultaneous ring list, you will get the call in both places at once, which might be annoying depending on how receiving calls in both places at once works, GUI wise. Maybe someone can customize the software to make this kind of solution easy. The call forward feature or sequential ring list will probably ring the softphone first, and if it does not pick up or is not connected, it will forward to the cell modem.
After a simple search, 1-voip.com looks like it might work, but I have no experience with their service, and I am sure that there are plenty of other options, so do you own research.
Because the VoIP solution is not integrated into the cell modem, service will not transparently switch between WiFi and cell calls. Although a call transfer feature, if available, can be used to make this happen manually. In theory, someone could make a VoIP provider and VoIP softphone bundle that makes this transparent by establishing calls through both WiFi and cell simultaneously and quickly flip the conversation between the 2 when needed.
One downside to this solution is that outgoing calls on the modem will use a different caller ID by default. There is an upside too. You get an incoming number that does not change no matter what phone or carrier you use.