Yes! E.g. you can use the sun as a lens during a solar eclipse.
It was actually the experiment that proved Einstein's general relativity to be more than a theory, because during a solar eclipse we can see stars at the edge of the eclipse that are actually _behind_ the sun.
https://en.wikipedia.org/wiki/Solar_eclipse_of_May_29,_1919