Do all molecules or ions with a free pair of electrons or one pi bond can act as nucleophiles?
Yes, but not necessarily will all be effective.
Molecules/ions with lone pairs or pi bonds have the ability of sharing their free electrons with an electron deficient nucleus and thus why they are called nucleophile.
The question now, do they all have the same strength? the answer is no, it depends on many other factors.
There are strong nucleophiles and others weak nucleophiles to an extent that they are not effective at all.