Coastal Corp. yesterday asked the Interstate Commerce Commission to require CSX Corp. to obtain prior approval from the agency in its bid to take over Texas Gas Resource Corp.

Coastal is locked in a struggle with CSX for control of Texas Gas.

CSX spokesman Ed Edell called Coastal's action " "frivolous and without merit. Obviously we'll defend our position very vigorously." He said that the ICC is expected to rule quickly on the petition.

Richmond-based CSX is the nation's largest railroad, an amalgamation of the Chessie System, Seaboard Coast Line Industries and other operations.

The petition is the latest move by Coastal in the takeover fight that began earlier this month when CSX made a $1 billion bid to take over the Owesboro, Ky., gas resource company. Texas Gas was fending off a hostile takeover attempt by Coastal, a Houston concern.

Coastal charged yesterday that a preemptive move by CSX was invalid and that the ICC must grant prior approval to the rail carrier's acquisition of Coastal, which, through its subsidiary, American Commercial Lines, is the major water carrier in the Ohio River region. CSX controls rail traffic in the area.

CSX had attempted to head that requirement off by establishing a special voting trust for American Commercial Lines while awaiting an ICC ruling.

The petition also called for an investigation of the financial condition of CSX, citing the ICC's determination in 1981 that the corporation's six major rail operations were "revenue inadequate" to operate rail service. That ruling allowed the corporation to win exemption from controls on rates for shipping export coal.

Coastal charged that "it is clearly impossible for the principal railroad components of a corporation to be found by an agency of the United States government to have revenues inadequate to sustain themselves while the holding company parent simultaneously offers to acquire a nontransportation enterprise for an aggregate cost exceeding $1 billion."