There are two possibilities:
The original code was licensed under "LGPL 2.1 only". This is the case if the license does not explicitly allow you to use a later version of the LGPL, but the license text does allow you to change the license to GPLv2 or a later version. In this case, your modified version can be released under the LGPL v2.1, GPL v2 or GPLv3.
The original code was licensed under "LGPL v2.1 or later". If the license reference allows you to use LGPLv2.1 or a later version, then you can release your modified version under LGPL v2.1, GPL v2, LGPL v3, GPL v3 or later versions of either GPL or LGPL (if and when those later versions are created).
License compatibility only becomes relevant when you are using a library in a larger project, where that project uses the library but is not a modification of the library.
When you are making changes to an existing project, those changes must be under the same copyright license as the original, except if there is explicit permission in the license to use a different (version of the) license or to sublicense the work.