You can use an extension cord on a welder. But you need to make sure that the cord is rated for the power you need.  Most welders require at least a 50-amp circuit. So, you'll need a heavy-duty extension cord of the appropriate gauge.  Before you go shopping, make sure you double-check the rating on the cable. Because of the high power requirements, it's best to use a heavy-duty extension cord for your welder.