Yes, they can. The genes for mercury resistance are carried on bacterial plasmids which also carry the antibiotic resistance gene.