You can still have chemistry on screen without getting on with the person. But it just makes your job a lot easier if you don't have to gird your loins, if that's not quite the right phrase, every time you're going to do a scene with that person.
I would say that maybe directors who act as well are easier with actors. I'm not saying that all directors have this, but sometimes you'll come across a director who sort of looks at an actor a bit like a kind of untrained horse that's been let out of the stable, like they might buck him.

