A criminal defendant is entitled to reasonable bail. What's reasonable? Ultimately, that's up to a judge to set the amount, but in some cases, you cannot post bail. If you or your friend was arrested on a "no bail" warrant, then it means just that - they cannot be bailed out before going in front of the judge. This usually happens in allegations of probation violations or if a person has failed to appear in court.
Even murder cases usually get bail set, except in certain instances, particularly when there are special circumstances alleged that could result in the death penalty or life in prison.
If bail has been set and there are no other holds on them, then a defendant can be bailed out.
Should you bail them out now or wait?
In some instances, waiting until they go to court in the morning (or their scheduled appearance) may be a good idea. Why? First, the DA may not file charges by then. If no charges are filed after an arrest (either because they are never going to file or they're still investigating before filing), then the accused will be released from custody and no bail will have to be posted.
Other times, it may be better to wait and see what charges are filed. Many charges in California are "wobblers," meaning they can be filed as a felony or a misdemeanor. The police always book you on the felony and bail is set assuming it's a felony. If the DA only charges a misdemeanor, then I can argue to reduce the bail at the first court appearance based on the lower charge. That saves how much bail has to be posted.
Can a person be released before court without bail?
In many cases, yes. Often, I can arrange a substantial reduction of the bail amount and even a release on their own recognizance (an "O.R." release) for my clients. Every case is unique, but it can happen. You never know until you try. In Orange County, there are detention release officers that can determine if an O.R. release is appropriate.