Very easily.
I'm assuming a number of things here, so replace the names of the objects and sprites as needed:
The player is called player_obj
The enemy is called enemy_obj
The enemy has a sprite for left and right facing- they are called face_left and face_right
Now you would do something like this in the enemy's step event. If you have more than two sprites, it gets a bit more complex, but it's easy enough to change.
if self.x<player_obj.x{self.sprite_index=face_right}
if self.x>player_obj.x{self.sprite_index=face_left}
That help?
Lemme know if I messed up, that was off the top of my head.