As shown in this question and answer, I am confused by the terms "hostile" and "enemy". So I was wondering if in my own game I could simply remove the "hostile" from the opportunity attack rules, because I think there it is particularly useless.
Currently, the rule on opportunity attacks says (PHB, p. 195; emphasis mine):
You can make an opportunity attack when a hostile creature that you can see moves out of your range.
I'm thinking attacks are allowed against allies; why shouldn't attacks of opportunity be?
Would there be balance issues if I house-ruled that opportunity attacks can be made against any creature, not just hostile ones? Are there any spells, effects or others that now unexpectedly work differently?
The revised rule would read:
You can make an opportunity attack when a creature that you can see moves out of your range.
Edit: Based on one of the answers about the warcaster, I can see why it shouldn't be like this. Now one of the reasons to allow one to attack an ally would be for example when you get turned against them, however they are not hostile towards you. So a solution should allow AoO against enemies that are not hostile towards you, but it shouldn't be possible if you don't actually mean to harm the enemy.