I'm just wondering. I live in the OC by the way. I like to ride against traffic because it makes me nervous otherwise. I grew up in Brooklyn and there they tell us to ride facing traffic.
California law on this is somewhat complicated.
First, though: your intuition and childhood bicycle safety lesson is wrong. It's safer to ride with traffic on the road than on the sidewalk. Cyclists being hit from behind is very rare, but being hit by cars at intersections or driveways is much more common, and the sidewalk puts you at much greater risk of that kind of collision. The advice you had about riding against traffic is bad advice that's only valid for people walking 4 miles per hour along the side of the road.
In California, it's legal to ride on the sidewalk, but individual jurisdictions (counties or cities) can make it illegal. It's not uncommon for a city to make it illegal to bike on the sidewalk in a downtown area, but leave it legal in residential neighborhoods.
In other words, the legality question is local to Orange County, the specific city you're riding in, and possibly even the specific area of the city you're riding in.
If you're on the sidewalk, and it's legal to ride on the sidewalk in your area, then it should be ok to ride facing or against traffic while on the sidewalk. However, If you get off the sidewalk and on to the road, then you must ride with traffic because YOU ARE TRAFFIC.