You are right to be concerned but in practice you don't need to worry.
My partner, our son, and I all have different surnames (his being mine + the first part of hers). We have never had a problem anywhere, it was only once queried going into South Africa but more as a matter of curiosity than anything else.
We have also travelled sometimes with children not related to us and even then not had a problem, but we always get a letter from the parents and a copy of the parent's passport and child's birth certificate just in case, but it's never been needed.
I understand that the the only country where there is potential for a problem is France, where an adult leaving France with a child which has French nationality needs a 'permission de sortie de territoire' from the other parent or legal guardian.