Yes and no—it all depends on the type of ham you are interested in eating.
The two main reasons to exercise caution when it comes to deli meats are food safety and food additives. If the ham in question is the sliced black forest variety you put on sandwiches, then unfortunately it's best to remove it from your lunch rotation. Cold ham slices that you get pre-packaged or from the deli counter are more likely to host bad bacteria. They also contain nitrites/nitrates, preservatives that are likely not the best to have too much of during pregnancy, if at all.
Roast ham, on the other hand, is a bit safer when it comes to the risk of foodborne illness, though the nitrite/nitrate issue is still relevant. An interesting (and potentially disappointing) fact is that ham tends to contain the highest amounts of nitrates/nitrates of the deli meat family, so it’s not something you want to have regularly.