WASHINGTON (AP) _ A plan to create a new rail link between key East Coast ports and the Canadian interior may fall apart because of a short stretch of tracks between Buffalo and Niagara Falls, N.Y.

The tracks - known as the Buffalo-Niagara Gateway - belong to the Consolidated Rail Corp., which has gone to a special court over the dispute with Canadian Pacific Ltd.

''I wouldn't want to be in the position of saying what's motivating Conrail in all of this but certainly a major competitor in their back yard has got to be of concern to them,'' Canadian Pacific spokesman John Cox said last week.

''There are two issues embedded in one - whether the trackage rights are available to us and, second, what the cost will be. Right now we're blocked on both fronts,'' he said.

Canadian Pacific has offered to buy the financially ailing Delaware & Hudson Railway and link it at Niagara Falls to CP Rail tracks into southern Ontario. If it can't get the trackage rights, CP may withdraw its $25 million offer, Cox said.

Cox said the stretch of track was about 15 miles long. On Monday, Conrail said it was 30 miles. Cox could not be reached to resolve the discrepancy because of the Canadian holiday of Thanksgiving on Monday. The spokesman for D&H was not in his office Monday.

The link is vital to Canadian Pacific's plan to use the D&H system to connect the ports of Philadelphia and New York with the Canadian interior. If CP can put all the pieces together, it will be competing directly with Conrail for freight in the Northeast.

The D&H, the nation's oldest continually operated railroad, filed in July 1988 for protection from its creditors under U.S. bankruptcy laws. The railroad, which runs from Montreal to Washington and between Albany and Buffalo, owes about $100 million.

CP took over operation of the D&H in August and agreed to absorb any further financial losses, which had been running at about $200,000 a month.

On Oct. 1, Conrail took the track dispute to a special three-judge court, which was created in the 1970s to oversee the railroad bankruptcy proceedings that created Conrail. Court spokesman Richard Eriksen said the panel would hear the case in Washington sometime between Oct. 10 and the end of the month.

''Conrail filed its motion with the special court because that court has indicated in the past that Conrail should bring cases Conrail believes are under the court's jurisdiction to the special court,'' Conrail spokesman David Neurohr said last week.

On Monday, Neurohr said Conrail believes CP should pay its fair share to maintain the Buffalo-Niagara tracks, although he declined to give dollar amounts.

''Under Conrail's proposal, CP and Conrail would both contribute capital funds proportionate to each railroad's use of the tracks,'' Neurohr said, reading from a statement. ''Although the tracks are now in satisfactory condition, the dramatic increase in tonnage proposed by CP is likely to impose an expensive maintenance and repair burden on Conrail that would not otherwise be incurred.''

Conrail negotiated trackage rights with D&H in 1976 but those rights were never exercised, Cox said. Conrail is arguing that those rights would not extend to CP as the new D&H owner.

In addition, Cox said, Conrail is seeking to raise the per-car cost for running trains over its tracks.

''Standard agreements between railways these days for operating trains over another railway's line - it's a mileage rate per car - can be anything between about 21 or 22 cents per car-mile to 50 to 55 cents per car-mile,'' he said.

That would translate to $6 to $10 per car, he said.

''But what they're looking for is $145 in each direction, so that's a bit of difference,'' he said.

This is the second time that Conrail has thrown up a roadblock in CP's effort to buy the D&H. Earlier this year, Conrail refused to negotiate the rights to its tracks between Hagerstown, Md., and Harrisburg, Pa. This led CP to withdraw its initial $35 million bid for the D&H.

CP later offered $25 million for the D&H, a bid that was accepted in May by the bankruptcy trustee overseeing the railroad's reorganization.

Last week, the Interstate Commerce Commission added its unanimous vote of approval to the deal, and the matter appeared to be headed to U.S. Bankruptcy Court in Wilmington, Del., for the finishing touches.

But that hearing has been postponed from Oct. 10 to Nov. 2 because of the special court case.

CP owns about 14,000 miles of tracks in Canada and about 5,000 in the United States.