`which` is the wrong tool. `getopts` is usually also a builtin:
> Since `getopts` affects the current shell execution environment, it is generally provided as a shell regular built-in.
~ for sh in dash ksh bash zsh; do "$sh" -c 'printf "%s in %s\
" "$(type getopts)" "$0"'; done
getopts is a shell builtin in dash
getopts is a shell builtin in ksh
getopts is a shell builtin in bash
getopts is a shell builtin in zsh
If you're using a shell script, you can safely depend on `getopts`. There might be other reasons to favour one or the other, but `getopts` is _standard_.
See also: Why not use "which"? What to use then?