Yoda was a "live hands" puppet. If he could wack Artoo with his cane he could have used a lightsaber.
Even a Skeksis can swing a sword. ;)
Yoda may not even have brought a saber with him to Dagobah, or it's long since become useless in that climate.