This is most notably an issue with Anton Nasser in the Silla mission, where "getting Nasser'd" is common enough that we, well, invented the phrase "getting Nasser'd". He has enormously powerful guns for that stage of the game, that can readily one- or two-shot the player; even if he doesn't kill them, he can leave them so weakened that enemy ships can do them in easily. Fly a little too close to an enemy ship and he might well kill the ship and you in a single salvo.
But there's also a number of situations where putting the player and their allies on the same team would just make gameplay smoother. For example, protecting the freighter with Fiona on it from the Penitents -- if you could shoot "over" the freighter instead of having to work around it, it'd be much more pleasant. Of course there's an argument to be made about being careful with your shots. But ships are clearly able to avoid shooting each other when they don't want to (you can't shoot your wingmates, AI ships don't shoot their stations or other defenders, etc.). IMO any time the story suggests that the playership and other friendly ships clearly have no reason to want to shoot each other, friendly fire should be disabled between them.