The Pope may resign if he chooses, but he may not be forced to do so, nor is it necessary for anyone to accept his resignation if he does decide to resign.
Here is the appropriate canon:
Can. 332 §1. The Roman Pontiff obtains full and supreme power in the Church by his acceptance of legitimate election together with episcopal consecration. Therefore, a person elected to the supreme pontificate who is marked with episcopal character obtains this power from the moment of acceptance. If the person elected lacks episcopal character, however, he is to be ordained a bishop immediately.
§2. If it happens that the Roman Pontiff resigns his office, it is required for validity that the resignation is made freely and properly manifested but not that it is accepted by anyone.