This will generally work the same, i.e. you'll flip the sprite like you'd for the player.
Just, instead of e.g. using the movement input, you'll determine the direction by something else, e.g. the movement direction.
The details would depend on how the game object is actually moved and how your scenes are set up (e.g. which axis is the left-right axis).