i believe that the short answer is "no" - git is not going to act on a repo without being below it's git root - in fact, even then, the latest version of git will refuse to do anything, unless the repo is owned by the same user, or is added to a whitelist
the obvious solution is already posted by the OP
cd $repo ; git checkout $branch ; cd -
... so i assume that there is some reason to literally avoid changing directories - a variation on that would be to do the work in a sub-shell
$ repo=/home/wonk/repo/path
$ branch=dev
$ pwd
/home/wonk
$ ( cd $repo ; git checkout $branch )
$ pwd
/home/wonk