We are removing vinyl siding from our house and replacing it with a cement-type product. Is it necessary to remove the vinyl siding's foam insulation before applying the house wrap?
Cement lap siding is extremely durable compared to vinyl. Good move!
By "foam", I assume you mean polystyrene foam board. I would not remove the foam, since it increases the insulation in your house, and reduces both heating and cooling bills. But a "water resistive barrier" (house wrap) is required under cement boards. So if your house doesn't already have one under the foam board, you must install one.
Cement board is OK to install directly over foam board up to 1" thick. If yours is thicker, you need to install furring strips over the foam board, or remove/replace it.
More installation requirements for one brand of cement board (don't know if you're using this brand, but other brands surely have installation requirements available either online or in print) are available here: http://www.jameshardie.com/d2w/installation/hardieplank-hz5-ca-en.pdf