Shabbat, Chapter Sixteen, Mishnah Seven
The mishnah teaches that sometimes one may cover certain things with a dish on Shabbat in order to avoid undesirable results.
One may turn a dish over a lamp so that the beams should not catch [fire], and over an infants excrement, and over a scorpion so that it should not bite.
Rabbi Judah said: an incident came before Rabban Yohanan ben Zakkai in Arabia and he said, I fear that he may be liable for a sin-offering.
Again, the mishnah teaches that one can do certain things to prevent a fire from spreading on Shabbat. In the case mentioned here, if the fire were to catch the beams which hold up the roof, it could cause significant damage. Hence, it is permitted to turn a dish over it to prevent it from spreading.
The mishnah continues to list other instances in which one can overturn a dish on Shabbat. The first is over the excrement of an infant, which itself cannot be moved because it is muktzeh (off-limits). It is muktzeh because it is disgusting. So even though it is muktzeh, one may carry a vessel to cover it.
The second thing is covering a scorpion with a dish so that it will not bite. Although this may be seen as trapping/hunting, since she does so not for her own need (i.e. to use the scorpion) but rather to prevent it from causing damage, it is permitted.
However, R. Yohanan ben Zakkai thinks that one who turns a dish over a scorpion is dangerously close to being liable to bring a sin-offering on Shabbat, i.e. this may be prohibited. The problem is that if she covers the scorpion to catch it and then use it for medicinal purposes, she would be liable (see Eduyot 2:5). When this incident came before R. Yohanan ben Zakkai he didnt outright rule that the person was liable, but neither did he say that it was fully permissible.