The Transportation Department's plan to sell Conrail to someone with deep pockets is running into heavy political opposition centered in Conrail's home state of Pennsylvania and generated by a well-oiled campaign run by Conrail Chairman L. Stanley Crane.

Transportation Secretary Elizabeth Hanford Dole recently wrote, "The sale of Conrail is dramatic, but we must keep it -- as much as possible -- out of the theater of politics."

Both sides are failing. Dole, in an article that appeared in the Philadelphia Inquirer five days before she sent a tough letter to the non-management members of Conrail's board of directors, asked, in effect, if they knew the extent of Crane's campaign opposing her sale plans.

"Was the board notified in advance of these expenditures and activities? Was a mailing advocating Mr. Crane's personal proposal paid for with Conrail corporate funds? If so, was that expenditure approved by the board?" her letter asked.

The mailing was a letter Crane sent to Conrail's shippers. It said, among other things, "A broad-based ownership of stock will continue to allow a board of directors, management and employes the independence to act in the long-term interests of the company and the customers we serve, and not, potentially, in the short-term interests of a single owner."

Just to make sure those interests are properly understood in certain parts of Washington, Conrail has engaged the services of Nofziger and Bragg, a consulting and public relations operation that includes Lyn Nofziger, a long-time political adviser to President Reagan.

"Our purpose in hiring Nofziger and Bragg is to take yet another opportunity to stimulate a full and open disclosure of all options to all publics concerning the sale process," a Conrail spokesman said.

Dole wants to sell the federal government's 85 percent interest in Conrail to one of three bidders her department has found ready and willing. Crane wants Conrail stock to be sold in a public offering, an arrangement that would guarantee that he and his highly successful management team retain control.

Whatever civility there was between Dole and Crane has disappeared in recent weeks, a fact that doubtless dates from a hostile meeting they had in her office last summer when she invited him to critique various purchase offers.

Pennsylvania's two senators, both Republicans, have come out four-square on the side of Crane and Conrail.

Sen. Arlen Specter, who held a fact-finding symposium in Philadelphia Wednesday, said then, "There is a growing sentiment in Congress . . . for a public offering. I would not like to see . . . a confrontation between the Congress and the administration. If we don't come to an agreement with the various congressional committees taking this up, it's going to be bedlam."

Sen. John Heinz is organizing a "Conrail coalition," which he hopes will include the 30 senators from the 15 states in the Northeast and Midwest where Conrail provides freight service. "Sen. Heinz has not been convinced that the Transportation Department should continue negotiating with a single bidder," a spokesman said yesterday.

The problem with a public offering, Dole and the Transportation Department keep explaining, is that the government would be unable to win long-term service and employment guarantees from an unnamed public buyer.

She is attempting to negotiate such guarantees with the three private groups: the Alleghany Corp., a New York holding company with a long history of running railroads; an investor group headed by J. W. (Bill) Marriott, and Norfolk Southern Corp., which already owns a significant chunk of eastern railroad business.

All have offered about $1.2 billion in cash plus other considerations. Their bids are under study by the Treasury and Justice departments for tax and antitrust reasons.

The public offering proposal Crane's management team is backing anticipates pledging future Conrail income to finance a loan until all the stock can be sold, a period of some years. Dole's advisers call that a leveraged buyout, something she has said she would not permit because it is riskier than a purchase not tied to Conrail assets. After it sells Conrail, the government never wants to see it again.

That proposal would also limit individual stock ownership in Conrail to 10 percent, virtually ensuring the tenure of the present management.

"Any implication that Conrail management's efforts have been made for any other reason than actively seeking to do what is in the long-term interests of Conrail's employes, its shippers and the region it serves is inappropriate and without merit," a Conrail statement said.

"I can't believe how messy this gotten," a knowledgeable Capitol Hill source said.