Which ancient society?
In the Byzantine Empire, there was at least one eunuch who became a high-ranking general. The Emperor Justinian trusted him with a large military force because he knew the Empire would never consent to being ruled by a eunuch.