The 4th level ranger alternate class feature Distracting Attack, from PHB II p. 55, does exactly this. Any time the ranger hits an enemy with a weapon attack, melee or ranged, that enemy counts as being flanked for the next allied attack within a turn.
The problem (other than convincing some poor sod to take 4 levels of ranger and then trade away their emotional support animal companion) is that it lasts for a single attack. That might be fine at lower levels, but it is awkward, especially since this option doesn't even come online until level 4. Maybe you can convince your DM to let a druid take Distracting ShotAttack, and then at least it would bridge from level 1 until iterative attacks.
Distracting ShotAttack isn't a great practical solution, but it is mechanically exactly what you're looking for.