Just as an aside, NASA is a civilian agency. A NASA astronaut may be an active duty member of one of the military branches while also working for NASA, may be a former member of a military branch, or may have never served at all. Apollo 17 astronaut Harrison Schmitt was a civilian that walked on the moon.
Also, an astronaut is any person that travels beyond the earth's atmosphere (100 kilometers or 62 miles altitude, commonly known as the Karman Line), no special training or other qualifications required, so if you can get up there somehow, congratulations, you're an astronaut!
So, can civilians work on a starship? Why not? Picard let a 15 year old kid pilot his ship, so anything is possible.