A U.S. District Court, in a potential blow to efforts by commercial banks to get back into the securities field, ruled yesterday that commerical paper is a security but did not actually prohibit banks from selling it.

Bankers Trust Co., the bank involved in the case, said it would continue to sell third-party paper.

Judge Joyce Green ruled that the Federal Reserve Board violated the Glass-Steagall Act of 1933, which separated the traditional banking functions of deposits and loans from the selling of securities, but its 1979 decision to allow commerical banks to sell commercial banks to selel commercial paper for third parties. She did not, however, rule on what should be done next.

No one yesterday appeared to know what the next legal move would be, but Green indicated in her ruling that Congress eventually might have to settle the issue.

Bankers Trust in New York issued the followin statement: "The ruling does not prevent [the company] from continuing to offer its commercial paper service to its customers. The court ruled that commercial paper was a 'security' for purposes of the Glass-Steagall Act. It did not rule that the activities of Bankers Trust were 'underwriting,' which is a necessary factor before [it] would be barred from carrying on such activities. Therefore Bankers Trust will continue to offer its existing commercial paper service."

The Fed's decision followed Bankers Trust's entry into the field in the summer of 1978 and a subsequent attempt to stop it by the Securities Industry Association and A. G. Becker Inc. When the Fed granted permission, SIA and Becker sued.

At stake is the future of a $153-billion-a-year industry. Becker, an international investment banker, is the largest of six major dealers whose sales account for almost half of the market. Commercial paper consists of unsecured, short-term promissory notes issued by companies for periods of one day to nine months.