In a function definition foo () { … }, if foo is an alias, it is expanded. This can sometimes be a problem, but here it helps. Alias foo to some other name before sourcing the file, and you'll be defining a different function. In bash, alias expansion is off by default in non-interactive shells, so you need to turn it on with shopt -s expand_aliases.
If sourced.sh contains
foo () {
echo "foo from sourced.sh"
}
then you use it this way
foo () {
echo "old foo"
}
shopt -s expand_aliases # necessary in bash; just skip in ash/ksh/zsh
alias foo=do_not_define_foo
. sourced.sh
unalias foo; unset -f do_not_define_foo
foo
then you get old foo. Note that the sourced file must use the foo () { … } function definition syntax, not function foo { … }, because the function keyword would block alias expansion.