It was the wonderful world of New York Democratic politics here when Rep. Elizabeth Holtzman, who has spent her four terms in Congress following the trail blazed by Bella Abzug in trashing the defense program, concluded a debate by declaring: "I stand for a strong defense."

Holtzman was clever enough to save this remarkable declaration for the final moments of a televised one-hour debate of candidates seeking the Democratic nomination for the Senate, thereby preventing rebuttal. But that she was able to make the claim at all means her opponents have flinched at hammering away against her record, either in debate sponsored by the Buffalo Courier-Express or before it.

Since four-term, 76-year-old liberal Republican Sen. Jacob Javits is vulnerable, a U.S. Senate seat may well be at stake. But transcending New York, Holtzman's candidacy represents Democratic activists who seek and often win nomination from rank-and-file Democrats with antithetical views on defense and the world communist menace.

Holtzman is Abzug's political god-daughter in more ways than one. She has followed Abzug's trail in voting no to every single defense appropriations or authorization bill since the day she was sworn in. She has also followed Bella's campaign tactic of keeping covered her exotic views on national security and instead campaigning as a bread-and-butter liberal. She goes her role model one better, however, by claiming to "stand for a strong national defense."

To the ordinary voter watching the Buffalo debate over statewide television, there seemed no fundamental disagreement between Holtzman and her principal opponent in the Sept. 16 primary, former Miss America Bess Myerson. Holtzman just came over as smarter, better organized and not quite so nice.

The reason is that Myerson's managers have not fully digested the lesson courageously taught by Sen. Daniel Patrick Moynihan when he defeated Abzug, then a member of Congress, in their classic 1976 battle for the Senate nomination: there is no reason a liberal Democrat cannot be pro-defense and anti-communist.

Myerson, vigorously supported by Moynihan, started off last March as his apt pupil. For the first time, Holtzman was not painted as the fearless young lady from Brooklyn who starred in the Nixon impeachment hearings but as an anti-defense trasher.

That was before Myerson prevailed on David Garth, the Manhattan-based media wizard, to run her campaign. Garth's theme is her claimed ability to get more federal dollars for New York. She has been advised not to engage in a "cat fight" with Holtzman while former mayor John V. Lindsay, running a poor third in the polls, smiles indulgently.

Such advice often runs counter to Myerson's instinct that Holtzman's defense record could alienate Holtzman's heavy Jewish support. How is it possible to support Israel while voting against production of the weapons it needs? Yet when Lindsay (no cold warrior) opened the Buffalo debate by criticizing Holtzman's defense record, Myerson kept off that subject in fear of starting a "cat fight."

At the New York Times debate, Myerson did get in the first licks on defense. But she is no Pat Moynihan, fresh from the floor of the United Nations hurling thunderbolts at the totalitarian left. Her argument in private that Holtzman's defense record is a menace to the nation's survival comes over in public as complaints that it impedes logrolling for federal dollars to New York.

Myerson is under wraps. She has been advised that Moynihan started declining in the polls when he attacked Abzug in 1976. Actually, in late August that year Moynihan was dead in the water; he revived by opening up Abzug's invitingly vulnerable record on defense.

Holtzman's record is no less inviting. She has voted for only two military bills: to increase the number of racial counselors (1973) and for extra pay to doctors (1974). She has voted against every new weapons system and for every cut in spending, except for one on aircraft engines destined for Israel.

She has opposed President Carter's modest increases in defense spending, talked about cutting $20 billion from the defense budget and inserted in the Congressional Record a "thought-provokking" analysis of how to cut $50 billion. While fighting foreign aid to friendly authoritarian regimes, she battles for money to Marxist dictatorships.

"My constituents know what my record has been," said Liz Holtzman recently when challenged about her defense record. Whether those Brooklyn voters really do is doubtful. That her actual stance on national security at a time of maximum Soviet audacity is still unclear to the voters of New York state is undeniable, thanks in no small part to her own astute tactics.