The prohibition of constructing an Ohel (tent) applies when there is a roof and four walls. The Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909)holds that even if there are no walls, constructing an overhanging alone is prohibited, if its purpose is to protect that which is underneath it, e.g. to provide shade or shelter from the rain.
Based on this, is it permitted to hold a jacket over one’s head on Shabbat to protect himself from the rain or sun? The Bet Meir (Rabbi Meir Posner, 1729-1807) in Siman 315 addresses this question. He cites a Gemara (Shabbat 43) which permits two people to hold a sheet over a corpse to provide shade and protect it from decomposing. He asks: How could that be permitted? Shouldn’t that be a violation of Ohel? Even though there are no walls, the overhanging is used for protecting that which is underneath it.
He answers that from here a general principle can be derived: If the overhanging is held by people, and not fastened to a structure, there is no prohibition. Based on this, there is no problem to hold a jacket over one’s head.
Accordingly, the Sis Eliezer (R. Eliezer Yehuda Waldenberg, 1915-2006, Jerusalem) in Vol. 10:4 permitted holding a Talet over a Sefer Torah at the Kotel on Shabbat to protect it from the rain, since people are holding it.
SUMMARY
It is permitted to hold a jacket over one’s head for protection from the elements on Shabbat in a place where there is an Erub.