Bethlehem Steel Corp., the nation's second-largest steelmaker, yesterday reported a third-quarter loss of $32.3 million and largely blamed the economy for the performance.

Meanwhile, Standard Oil Co. of California, the fourth largest U.S. refiner, reported yesterday that its third-quarter earnings rose 17 percent primarily on higher profits from its domestic energy operations.

Cities Service Co., the nation's 18th largest refiner, announced a 7.5 percent gain in third-quarter earnings.

In the three-month period ended Sept. 30, Bethlehem had sales of $1.48 billion, down 17.9 percent from the same period last year, when Bethlehem had sales of $1.8 billion.

The 74-cent-a-share loss in the last quarter compared with $1.71-a-share earnings in the third quarter of 1979 when Bethlehem reported a profit of $74.8 million.

"Bethlehem felt the full effects of the economic recession in the third quarter," Bethlehem Chairman Donald Trautlein said in a company statement. "Low levels of operations, high fixed costs, price deterioration for steel products -- all contributed to a net loss for the quarter."

There was an improvement in volume of steel shipments toward the end of the quarter, Trautlein said.

Nine-month earnings were $65.2 million ($1.49 a share) on sales of $5.05 billion compared with earnings of $237.1 million ($5.43) and sales of $5.4 billion in the same period a year ago. So far this year, sales have dropped 6 percent and profits 72.5 percent from the first nine months of 1979, Bethlehem said.

Trautlein said 1980 will be "a disappointing year for us."

"While we expect to be profitable in the fourth quarter, we anticipate only a modest profit for the entire year. Based on present projections, Bethlehem will have shipped the lowest number of tons of steel for any year since the early 1960s."

Bethlehem shipped 2.31 million tons of steel in the third quarter compared with 3.31 million last year, and 8.25 million tons through nine months this year compared with 10.43 million tons in the first three quarters of 1979.

Socal earned $624 million ($3.64 a share) in the third quarter compared with $535 million ($3.13) a year earlier. Revenues rose 30 percent to $10.5 billion from $8.1 billion.

Nine-month net income was $1.79 billion ($10.44) on $31.6 billion in revenues compared with 1979 nine-month net income of $1.26 billion ($7.38) on $22.1 billion in revenues.

Socal said its domestic petroleum earnings climbed 41 percent to $319 million from $225 million in the 1979 third quarter, benefitting from higher crude oil and natural gas prices and increased natural gas sales. Stepped-up refinery runs improved profitability in its refining and marketing operations.

Socal is one of the four U.S. partners in Aramco, the Arabian American Oil Co., that have a market advantage because of their access to Saudi Arabia's low-priced crude. Socal said its foreign petroleum profits fell 12 percent to $249 million from $283 million a year ago.

Cities Service earned $92.6 million ($1.11) in the July-September period, up from $86.1 million ($1.03) in the third quarter last year. Revenues rose just under 2 percent to $1.63 billion from $1.60 billion.

Nine-month earnings were $369.7 million ($4.44 a share) against $241.3 million ($2.90) a year earlier. Sales rose to $5.6 billion from $4.5 billion.

The refiner said its third-quarter results reflected a 666 percent surge in profits from natural gas pipeline operations and a 57 percent rise in earnings from oil refining, marketing and transportation. The transportation segment benefited substantially from the sale of two tankers.