Water's oxygen is nucleophilic enough to attack a carbonyl group. However, the reaction is irrelevant because the formed hydrate is much less stable than the starting aldehyde or ketone.
The acidic medium makes some aldehyde or ketone molecules protonate. The protonated molecules have an enhanced electrophilicity and can be easily attacked by neutral water. These equilibria are also shifted to the left hand side.