Yes you can safely refreeze ham as I've done it many times before and still do it today.
I buy a few large hams at one time and then freeze them and then cut off what I need and then refreeze the rest of the cooked ham for later.
I've never noticed any difference in taste of the ham but it might not be as fresh as before but the ham is still safe to eat after freezing the ham again and again.