Even when using medicine is permissible, one may not apply topical medication (such as creams or ointments) to a bandage or a wound. If one applies ointment and smoothes its surface to spread it, he violates Torah law, as Memare’aĥ is a tolada of Memaĥek (Shabbat 75b; above, 18:6). It is also forbidden to place the ointment onto the body or the bandage without spreading it, out of concern that one will end up spreading it. Even if the bandage was prepared with ointment before Shabbat, one may not place it on the wound on Shabbat, out of concern that he will end up spreading it (SA 328:25).
However, to alleviate or prevent pain, the Sages allow one to place ointment directly on a wound or bandage, though one who does so must be careful to avoid spreading it. If the ointment was in a tube, he should place the tube directly on the wound. If it is in a container, one may apply the ointment using a tongue depressor or a spoon. The primary concern is that it should not be spread. When the bandage is placed on the wound, the cream will spread out along the sides. Nevertheless, as long as one does not smooth the surface intentionally, this is not prohibited (SSK 33:14; above, section 5).
Similarly, if one is in pain, he may place medicated cream on his skin and rub it in until it is completely absorbed. This is because as long as one wants all the cream to be absorbed, it is not considered Memare’aĥ. However, if one wants part of the cream to remain on the surface of the skin to make it smooth, applying the cream is prohibited by Torah law (Da’at Torah 328:26; R. Shlomo Zalman Auerbach cited in SSK ch. 33 n. 64; based on MA 316:24 and MB ad loc. 49; see above, 14:5, and Harĥavot).
If one is suffering from great pain that is weakening his entire body, he is considered a sick person, and one may treat him with compresses. Cloths that were dampened before Shabbat may be used for this purpose. If necessary, one may wet a completely clean cloth on Shabbat to use as a compress (see above, 14:4 and n. 2). In any case, he must take great care not to wring out the compress, whether in order for the water to reach the sore spot or in order to clean it after use (SSK 33:19; see Harĥavot here and above, 12:8, 10).