As mentioned previously, if before Shabbat one places a non-Muktze item on some sort of surface that also has Muktze, that surface becomes permissible to move on Shabbat. Based on this, Rabbi Baruch Toledano (Kitzur Shulhan Aruch, 288) discusses in whose pockets money was left before Shabbat. If that money was in the pocket because one simply forgot it there then the pants do not have the status of Basis, as they were left in the pocket intentionally. In such a case, if one wanted to wear these pants, one would need to shake off the pants until the money comes out of the pockets If, on the other hand, a person intended to leave the money in the pocket the logical conclusion is that the pants become a Basis and would be able to be worn on Shabbat. There are Poskim who rule based on the Mishna Berura (M.B. 308:30), however, that perhaps the pockets themselves become a Basis, but not the pants, and therefore one would not be able to wear them with the money still inside. Nevertheless, Rabbi Shlomo Zalman Auerbach (as quoted in Maor HaShabbat, vol. I, Michtav 11:6) rules that technically the pockets could be separated from the pants, and since the pants alone are permissible, then the pocket and thus the money inside are being carried indirectly, which would be permissible.
In the same vein, the Kaf HaHaim (308) rules that a table which has a drawer with Muktze inside does not itself become Muktze and could therefore be moved on Shabbat. Similarly, one would be able to move a stroller which has a built-in shelf that happens to have Muktze on it. However, Rabbi Baruch Toledano (ibid:9), quoting the Rabbi Avraham Danzig (Haye Adam), disagrees with Kaf HaHaim and writes perhaps the entire table would be considered Muktze. Rabbi Shlomo Zalman Auerbach (Shemirat Shabbat Kehilchatah, ch. 20, note 232) writes that practically speaking there appears to be a Halachic basis to permit moving the table since the drawer is seen as a separate entity, especially if it is removable.
Another example is a keychain which contains a house key and a car key. Since the house key is not Muktze and is of equal, if not greater, importance to the car key, the entire keychain becomes a permitted Basis. Since the car key cannot be shaken off, if one left it on the key chain accidentally before Shabbat, one would be able to carry such a keychain on Shabbat.
Summary: One may wear pants whose pocket contains money on Shabbat if the money was left unintentionally.