Can I hire a mercenary to use alongside my pet?

Fortunately yes, you can have a pet and a mercenary up at the same time. The mercenary is a group member, not a pet. This means they take up one of your group slots.