A bitter fight between the cable television industry and American Telephone & Telegraph Co. is endangering legislation designed to deregulate some cable operations, with the bill due for full Senate consideration as soon as Thursday.

At issue is whether states will have the authority to regulate the growing cable effort to provide data communications services. Under the bill, only "basic telephone service" would be left under state supervision. The question of defining that phrase is the center of the Senate debate and efforts to prepare compromise legislative language.

According to AT&T, the bill, at least in the form passed 15 to 2 by the Senate Commerce Committee in April, would permit cable companies to offer these potentially lucrative services in competition with local companies without having to file tariffs and other notices with regulatory commissions.

At stake, in the view of AT&T and the National Association of Regulatory Utility Commissioners, is the prospect of cable companies taking enough revenues from local phone companies to prompt further local phone rate increases.

"No less is at stake than responsiveness to customer needs, the continued economic viability of the BOCs Bell operating companies and the vast information-age potential of technological innovation," AT&T Chairman Charles L. Brown wrote last month in a letter to senators.

On the other side, the bill's principal proponents, Sens. Robert Packwood (R-Ore.) and Barry Goldwater (R-Ariz.), and the National Cable Television Association, say that local phone companies dominate the data transmission field and markets they compete in and that deregulation is inappropriate in the telephone markets.

"You build a different kind of cage for a gorilla than you do for a canary," said Thomas Wheeler, the head of the NCTA.

Some of the bill's supporters had hoped to bring the matter to the Senate floor today, although that failed as compromise efforts continued. After reports surfaced that AT&T supporters in the Senate might filibuster to prevent floor action, the measure's sponsors were working late today to delay the vote for about three weeks.

Although cable is a relatively new player as a carrier of high-speed data, many communications industry experts say its use will increase dramatically with the more widespread construction of cable systems, particularly in major areas.

Until recent weeks, the prospects for the cable bill had been muddied because of opposition to earlier cable deregulation moves from municipal governments and their principal lobbying arm, the National League of Cities.