If you want the code never to become propriety, you can use a copyleft license.
If you don't want to force programs that use your library also to become open source, you're looking for weak copyleft. These licenses ensure that adaptations of the library must be published under the same license as the original library.
The most used weak copyleft licenses are the Lesser GNU Public License (LGPL) and the Mozilla Public License (MPL).
The LGPL works on the "library" level. If they distribute changes to the library (stand alone or together with a program that calls functions in the library), they must do so under the LGPL, but they are under no license obligation to go open source for programs that only call the library.
They don't have to publish the program that calls the (modified or unmodified) library under the LGPL, but may do so under a propriety or permissive license as well.
The MPL works on a file level. If an entirely new code file is added, they are not bound by the MPL, but if they edit a file that was originally under the MPL, they do have to publish under the MPL.
Note that they are allowed to make changes to the library and not contribute anything back if they are not giving or selling the software to anyone. If they are only using it themselves, but nobody else receives a copy of the (compiled or uncompiled) software, they are under no obligation to publish whatever they changed.
For your situation the LGPL seems the best fit. You can choose between version 2.1 and version 3. Version 3 has protection against software patents and "tivoisation", which version 2.1 does not. This doesn't have any impact on the criteria you gave. Older versions are no longer relevant.