Of course it can; "Can flee" flag makes it feel threatened, whenever it gets attacked, adopting the realistic behavior of avoiding a threat that cannot be harmed back.
If you order it to move, it will indeed keep the unit stationary, but it will interrupt orders, such as channeling a spell (which is a periodic order). If you use SetUnitX/Y, apparently the "unit takes damage" event runs prior to the Can flee flag = makes no difference. If you move it as of "Unit - Move unit (Instantly)", it will interrupt any order.