TOKYO, NOV. 20 -- Commerce Secretary C. William Verity today warned Japan that it may face retaliation if it refuses to allow foreign companies to compete for public works construction projects.

In an appearance at Japan's National Press Club, Verity said Japan's refusal to allow foreign firms to participate fully in construction projects was "not acceptable to us" and would very likely spark congressional demands for retaliation.

He said access to Japan's huge construction market has become a "very hot item" on Capitol Hill and "there will be a very difficult time trying to keep our Congress from not retaliating in some way."

Verity, winding up four days of meetings here with a wide range of government officials, has made headlines with his blunt statements, in particular his accusation that Japanese companies were "dumping" products in the United States market rather than raising prices in line with the rising value of the yen.

His trip drew particular attention because he is the first Cabinet-level representative of the Reagan administration to meet with Japan's new prime minister, Noboru Takeshita. The trip was also Verity's first out of the country as Commerce secretary.

In his meeting with Takeshita, Verity urged the new prime minister to further open Japan's markets to foreign goods. He also voiced concern that Japanese exports were flooding some markets at the expense of local industries, according to Japanese Foreign Ministry accounts.

Takeshita reportedly responded that his government, like that of his predecessor, Yasuhiro Nakasone, would try to steer Japan away from its heavy reliance on exports as the driving force of the economy and toward an expansion of the domestic market.

Verity also held discussions with Foreign Minster Sosuke Uno and International Trade and Industry Minister Hajime Tamura.

Uno on Thursday told Verity that Japan would not change the awarding of public works construction projects to accommodate foreign firms, but would apply new market-opening measures only to quasi-private projects, such as the New Kansai International Airport being build near Osaka.

Construction of Kansai has been a major focus of U.S. demands that Japan allow greater foreign access to its domestic construction market. U.S. trade officials are convinced that all major Kansai contracts already have been awarded to Japanese firms.

"Our concern is we believe the United States has opened its markets for 30 years to anyone who wants to come in to the market," Verity said, citing the recent award of a Washington Metro contract to a Japanese firm. "We're suggesting if we have open markets in the U.S. we should have open markets in Japan."

In other matters Verity today told the National Press Club:

President Reagan would veto any trade bill that contained "protectionist" amendments and now has the votes in Congress to sustain such a veto;

He hopes the Japanese will continue to observe voluntary restraints on the numbers of automobiles they ship to the United States;

Japan, one of the world's richest nations, must continue to expand its domestic economy and absorb more imports from developing countries. He suggested that Japan pursue the economic path set out by President Reagan of lower taxes and greater spending on public works.

On the issue of dumping, Verity said Commerce Department analyses show that despite the fall of the dollar in the last two years and the dramatic rise in the value of the yen, the price tags of Japanese products in the United States have not gone up as much as they mathematically should have.

"We estimate that price cuts by Japanese exporters have offset half the increase in the value of the yen since January 1985," leading, Verity said, to the conclusion that "there may be widespread dumping of Japanese products into foreign markets.