I stumbeled over what seems like a rather propper solution:
julia> using Pkg
julia> haskey(Pkg.dependencies(), Base.identify_package("Revise").uuid)
true
The only caveat is that the docstring of Pkg.dependencies states that “This feature is considered experimental.”, so I am not 100% sure that this is what things will look like forever. But given the stability of Pkg, I am certain that this will work for a long time.