The Shulhan Aruch (Orah Haim 147:6) rules that one who rolls the Torah scroll – such as to bring it to the proper place – without first removing it from its casing is "making a mistake." The Kaf Ha’haim (work by Rabbi Yaakov Haim Sofer, 1870-1939) explains that there is a risk of tearing the parchment when one rolls the scroll while it is still in its case. (The Mishna Berura mentions this reason, as well.) One must therefore remove the scroll from its casing before rolling the Torah to the proper place.
Hacham Ben Sion Abba Shaul (Israel, 1923-1998) writes that if one needs to roll the Torah scroll only one or two pages, then he does not have to first remove it from the casing, as it is unlikely that the parchment will tear as a result of such a brief period of rolling. It is only when one must roll the Torah more than two pages that Halacha requires removing the scroll from the case.
It is permissible to remove the scroll from the case or insert it in its case on Shabbat, and this does not violate the prohibition against assembling and disassembling objects on Shabbat. Since the scroll in inserted and removed very easily into and from the case, this would not constitute "assembling" or "disassembling" as far as the Shabbat prohibitions are concerned.
Summary: If a Torah needs to be rolled more than two pages in either direction, it must be first removed from its case. The scroll may be removed from its case and inserted into its case on Shabbat.