Geraldine A. Ferraro said today that "I'd quit my job" if it ever became impossible to reconcile her religious beliefs and her constitutional obligation to uphold the separation of church and state.

"I believe very strongly in the separation of church and state. That's the principle upon which this government was founded," Ferraro said. "If I felt for one minute that I couldn't support that and still maintain my religious views, I'd quit my job. But I can and I will."

Although her aides said it was unintentional, Ferraro's vow almost precisely echoed that of John F. Kennedy in September 1960 when he also promised in Houston to resign as president if his Roman Catholicism could not be reconciled with his constitutional duties.

Ferraro struggled to steer her vice-presidential campaign back onto the offensive today, but the Democratic agenda again was partially eclipsed by questions about her dispute over abortion with Archbishop John J. O'Connor of New York.

In a news conference, 17 of the 23 questions focused on either abortion or O'Connor, who has accused Ferraro of misrepresenting the church's monolithic opposition to abortion.

When asked whether her campaign had been distracted by O'Connor's allegations, Ferraro hinted at the frustration caused by the latest in a string of distractions -- most notably the controversy over her and her husband's finances -- that have kept her candidacy off stride for a month.

"I would prefer debating George Bush . . . . I would like to be able to focus on the issues," she said. "We seem to be spending a lot of time on this one issue."

Ferraro said that in a telephone conversation Monday she and O'Connor "agreed to disagree." She favors a woman's right to choose whether to have an abortion; the archbishop has accused Ferraro of implying that the church is not utterly rigid in its opposition.

Ferraro got some assistance on the issue from Sen. Edward M. Kennedy (D-Mass.). In a speech Monday night in New York, he said the vice-presidential candidate and New York Gov. Mario M. Cuomo (D) were "right" in saying that "faithful Catholics" in public office can agree with O'Connor's "morality without seeking to impose it across the board."

House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) said in Washington today that he did not like to see the Catholic hierarchy involved in the campaign, adding that because of the Supreme Court's ruling on abortion, the only solution to it is through a constitutional amendment, which he opposes as not "workable." O'Neill said he personally believes that abortion is "a mortal sin."

Ferraro spent the day trying to sound other themes. Here, the former schoolteacher visited an elementary school and gave President Reagan a report card in which she suggested that he had failed his first term.

"For keeping his desk neat, Ronnie gets an 'A.' For making friends, a B-plus. For oral reports, a B-plus. He's very good at that," Ferraro said. "For effort, C. For paying attention in class, C-minus. For caring about others, D.

"Teacher's comment: Ronald Reagan needs close supervision. I do not recommend that he go into 1985."

She also returned to the war-and-peace motif that has been a hallmark of her stump speeches, saying, "I don't like it when our children are waking up at night and having nightmares about nuclear war. Some people are deciding not to start families because they don't want to bring up children in fear of the bomb."