Any atom with a lone pair of electrons can be a nucleophile. The formal charge on oxygen is -1, as you can verify from a simple calculation. I realize that sometimes curved arrows are drawn from the negative charge on an atom, but doing so misleads the unwary IMO.
To identify a good leaving group, look for something that would be a weak base, not a strong base, if it departed with the pair of electrons. IMO that is a better way of looking at leaving groups in substitution reactions than bond polarity.