This is true.
And removing the carpet around them will make them even more unstable. They will be sitting raised up an inch or two, with soft carpet under them, and now nothing to the sides or front. If they begin to slide in any direction, the lack of carpet there could lead to them tipping over.
Just realize that the right way (& the safe option) is more work: temporarily remove the books, move the empty bookcase, remove the carpet from underneath, then replace the bookcases & books.
(But you might also take this opportunity to examine the books there, and see how many you really need to keep, and which ones can be donated elsewhere. I recently did this, and donated about 75-80% of the books. Much more room in my house now.)