It would not work to separate water into hydrogen and oxygen and then burn the hydrogen to turn it back into water in the same vehicle because the cost of the chemical reaction one way would undo the cost of the chemical reaction the other way.
It might work to use a third source of power to separate the hydrogen and oxygen from the water and then later put the hydrogen in as car fuel and burn the hydrogen car fuel with oxygen.
This third power source could be a source of pollution