Using Wirt's Leg as a weapon
Wirt's Leg is Wirt's Leg. It still fulfills the item requirements as such.
However, it will be consumed in the process to get to the cow level, which sort of defeats the purpose of using it as a weapon.
So, yes. It will still do it's job, but you'll be out a weapon.
If you legitimately want to use Wirt's Leg as a weapon, you could certainly do so. Tal runes aren't overly rare, so you could put those in it. If you're concerned about losing your weapon when you want to access the cow level, fear not, because you could simply get another Wirt's leg. However, chances are good that you will have replaced the weapon by the time you are ready for the cow level anyway.