If the red hoplite was facing a blue non-light then the blue hoplite could just turn to face the cavalry with no risk of rear charge by the red hoplite with or without Cunningcairn's suggested change.
I think the ideal and most realistic solution would be that if a unit is sandwiched like this (aka at risk of getting rear charged rather than just flank charged) it shouldn't be able to attack anyone, even if it were in red hoplites' primary ZOC. Instead the only options should be standing there and breaking after the enemy attacks (even rotating a unit in a situation like this would actually require incredible drill and discipline) or attempt to desperately fall back away from both enemies' ZOCs with a very high chance of panic and cohesion loss in the process.
If a sandwiched unit can still attack at all, then it might as well be allowed to attack the hoplites in this situation since it could do so if the hoplites were "facing" it in mechanical sense (in practice they already are). The red hoplites being able to avoid the charge by being slightly angled is very gamey: If the red unit was a low quality unit instead, like poorly armed rabble for example, it would be safe from blue hoplites' possibly devastating charge just by being at angle.
This certainly isn't a high priority change for me either but there's no reason not to discuss all the possibilities
. I realize coding the falling back rules with all the ZOCs applying would not be a simple task as there's a large number of different situations to consider, not to mention the AI changes and possible new exploits.