If LGPLv2.1 code and LGPLv3 code are in different shared libraries, then they can be used in the same application, and you can license your application with a proprietary license / LGPLv2.1 / LGPLv3 as you wish.
Ref: https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility