I have a client that wants to opensource their project to receive contributions and leave the code as a public good. [...] But the client also wants to have an agreement with each of the institutions that want to use the code and have their own software running.
These two requirements are mutually-incompatible, not just with free software licences, but to some extent with software licensing generally. Even if your client sells only individual licences to specified institutions, and those licences are standard proprietary licences (no permission to copy, modify, distribute copies, etc.), some jurisdictions hold that the licensee can sell their license on if certain conditions are met, even if the language of the licence says it's non-transferable.
By the time your client has bound the licence up such that the software can only be run by institutions with whom the client has an agreement, it will be so constrained that nobody in their right minds will run it, and it definitely won't qualify as an open-sourced, public good.
Your client can have the warm feeling that comes from creating genuinely-free software (in which case we can advise on the specific licence), or they can have the questionable feeling that comes from total control over how their creation is used. They can't have both.