Define "necessary".
Obviously you can weld without cleaning, but it will be less than ideal. The results will vary depending on what lubricant you're using, and which process you are using. Excessive porosity is often the most obvious effect.
So in general, yes, you need to clean it. The question is, "How much?"
If we are talking about MIG/GMAW, then for non-critical stuff, particularly heavy wall, I usually just wipe it off good with a fairly clean rag. As long as the metal is shiny and "clean", that's usually good enough. For better quality/critical results, I wipe down with Acetone or Lacquer thinner, drying the residue with a clean rag rather than allowing evaporation.
For flux-core/FCAW or Stick/SMAW, wiping off is generally good enough because the flux will float out all but the most excessive of the contaminates. I've made strong repairs with SMAW on rusty greasy stuff, thought the results were no very pretty.
For TIG/GTAW, everything must be unbelievably clean and free of contaminates. For some materials more than others...
For O/A or other gas welding, it depends on the materials (welding/brazing/soldering as well as base material), use of flux, and other factors.
Note that this is also one of the reasons I sometimes use glycerin based lubricant. Simply rinsing and wiping/blowing dry results in a clean oil-free part for painting or welding. Enco sells "ready to use" purple stuff for something like $8 a gallon. Combine that with some other stuff (Dark sulfer cutting oil?) and a "Free shipping on $50 or more" coupon and your good to go.