Chancellor Helmut Kohl of West Germany reiterated today that the border between Germany and Poland would remain ''inviolable'' after his country reunites with East Germany.

His statement, in an address at Harvard University's commencement ceremonies, appeared intended to reassure Poles and Americans confused by his refusal to categorically rule out a shift in borders when he last visited the United States early this year.

Mr. Kohl, who received an honorary Doctor of Laws degree, called on the United States to participate actively in the rebuilding of Eastern Europe, as it did in the reconstruction of Western Europe after World War II.

Recalling the postwar plan for European reconstruction announced by Secretary of State George C. Marshall at Harvard's graduation exercises 43 years ago, Mr. Kohl said that this time Western Europeans could bear the major share of the costs of overcoming ''economic and ecological devastation'' in the former Communist countries. But he said their efforts would be more effective with American help.

A United States of Europe

Later, at an outdoor meeting of alumni in Harvard Yard, Mr. Kohl made it clear that his vision embraced a federal United States of Europe, a concept that is emphatically not endorsed by some of his European Community partners, including Prime Minister Margaret Thatcher of Britain.

''I am firmly determined that this federation should not be an exclusive club confined to the present members of the European Community,'' he said. He said that a federation should be as open to ''Poles, Czechs, Slovaks, or Hungarians'' as to countries like Austria, Sweden, Norway and Finland that may want to join.

But in a news conference later, he acknowledged that a European Community with more than 20 members would be ''hardly imaginable.''

Joking that German unification seemed a far-off dream when he last visited Harvard, for the graduation of his son Walter a year ago, Mr. Kohl said he was satisfied by the results of the Soviet-American summit meeting last week.

Diplomatic Poker

The Soviet Union will eventually agree to a united Germany's membership in the NATO alliance, he predicted, but is now engaging in diplomatic poker. Mr. Kohl hinted that he, too, has some cards to play, as Bonn assumes East German economic obligations toward Moscow ''to the extent that is reasonable.''

Harvard's president, Derek C. Bok, also granted honorary doctorates to the physicist Stephen W. Hawking; the singer Ella Fitzgerald; David Riesman, a social scientist; Adrienne Rich, a poet and essayist; Herbert A. Simon, an economist, and Michael Kimbrough Marshall, a Boston school principal.

At its 339th commencement exercises, the university granted 5,600 undergraduate and graduate degrees.