There are essentially 2 types of narrow band oxygen sensors using either titania or zirconia ceramics (generally these ceramics are actually doped with other elements.) The ones you generally deal with are zirconia.
The short answer is no, they generally can't be cleaned.
The long answer:
There are a couple failure models
Broken heater circuits
Eroded ceramic (hot exhaust gasses plus tiny particulates over a long period of time really will just erode the ceramic to nothing)
the first four the ECU should pick up as a completely non-functional circuit (and cleaning wouldn't help.) The fifth is the only instance when cleaning may be an option, in this instance generally the ECU will report out that the sensor is having a slow response (low cross count).
Ultrasonic cleaning may be an option, but is likely to damage the ceramic or the electrical attachments.
The other popular option is soaking the sensor tip in gasoline. If the contaminant were soluble in gasoline (typically it isn't), then this could theoretically clean the sensor, but the ceramic is a somewhat porous structure and the contaminants become embedded in the sensor, making it questionable if the solvent would do a reasonable job.
Incidentally the metal you see is not the sensor itself, just a protective shell. Physical agitation on the sensor itself would likely destroy it.
Lot of effort to slightly lengthen the life of the sensor, and it probably won't work. So generally if a sensor goes it is simply replaced, they aren't THAT expensive.
This website has a differing opinion. The tests are reasonable, but this is only for Zirconia style sensors http://mr2.com/TEXT/O2_Sensor.html
. The cleaning method for an O2 sensor that was fouled by a rich mixture, running it lean may work, try not to damage your engine if you actually can make it run lean.
Silicone from sealants, are soluble in gasoline
Soots, occasionally soluble in gasoline
Glycols, insoluble in gasoline
Metal contamination, insoluble in gasoline
Oil addatives, generally insoluble in gasoline (often metals, silica, potassium, calcium, etc.)
If you are curious why that test won't work with a Titania sensor, it is because they are actually powered and the O2 concentration on either side changes the resistance, as opposed to Zirconia which actually develops a voltage based on the O2 concentration imbalance. Oh, and wideband lambda sensors are a completely different beast.