Pediatlyte can replace water for now or you could give both.
If he isn't holding it down though, his stomach may need to rest.
It's really hard to tell with these things sometimes.
It could be an upset stomach or it could be something a lot worse.
Does he seem to be in any pain when you touch and push lightly on his abdomen? Unfortunately, if he keeps throwing up and can't hold water down, dehydration could happen quickly and you'd have an emergency. If he doesn't start to hold liquids down soon (and I can't tell you how soon it needs to happen

), he will have to get fluids from the vet.