In an aircraft, can you look at the sky to get your bearing and position like sailors do?
You sure can! It's not really done all too much any more in the days of GPS but it was done quite a bit in the early days of aviation. Historically, this was done by the "flight navigator" a position that no longer really exists. Some aircraft even had mounted sextants.
It has in the past. Though the process for both pilots and sailors is a little more complex than just looking at the stars. See a previous AviationStackExchange question.
Modern aviation has so many other navigation tools:
Inertial Navigation Systems
They make Celestial navigation obsolete. Although, it is not required pilot training. And you won’t see it used in GA aircraft. It is still in use by the military. Especially in ICBMs. My understanding is that the automated celestial navigation system used by the military was too expensive for widespread use.
Chapters 8-13 of the FAA Flight Navigator Handbook are dedicated to the subject. Sadly, the position of a Flight Navigator is also all but obsolete.