That is very simple.
Create a dog with its own sprite, animation and ect. Give the dog platform behavior.
Then do this
1) Dog -> compare X -> Less or equal then Player X -> simulate control RIGHT
2) Dog -> compare X -> Greater or equal then Player X -> simulate control Left
So, now when the dog is located not at the same spot on X coordinate with the player, it will move until it gets him