While the president set himself up for the battering he received for trying to stitch a cross onto the flag, he's been getting somewhat of a bum rap on another matter concerning religion. When he appeared, for instance, before the B'nai B'rith International convention in Washington this month, some in the audience cited as further evidence of Reagan's contempt for the Establishment Clause the fact that by signing the "equal access" bill on Aug. 11, he has now opened the public schools to religion.

That statute, as finally passed, is not at all what the president and its first draftsmen orginally had in mind. What they wanted to do is prohibit discrimination against student-initiated religious clubs in schools receiving federal funds. Only reliious clubs. That wouldn't fly, so the final bill gives equal protection to "political" and "philosophical" as well as "religious" student speech. Accordingly, while the Emma Goldman-Bella Abzug Society may meet in one classroom, the Newman Club can hold its meeting next door.

The Equal Access statute applies to those schools, and there are many, that already allow voluntary meetings by students, from computer hackers to aspiring journalists. Once a school does permit such meetings, a "First Amendment forum" has been established; and after all these years, religious clubs can now be part of that forum. Under the new bill, the meetings have to take place before or after regular school hours. The school and its officials may not sponsor the meetings in any way; and the school does not give up any of its authority to maintain order and to make sure that "attendance of students at meetings is voluntary."

Apprehension concerning the effects of "equal access" has been acute among a number of groups much concerned that the wall between church and state be kept from further erosion. The most persistent fear is that impressionable teen-agers will be coerced by peer pressure into joining cults. The specter of Rev. Moon comes to many distressed minds.

On the other hand, Rep. Barney Frank, a dauntless paladin of the Bill of Rights, supported the final version of the bill because he thinks "We ought not to infantilize teen-agers."

Were I in Congress, I would have said the same thing in voting for the bill. During the year, I spent a fair amount of time in high schools, being invited by teachers and occasionally by students who have read my history of the First Amendment and some of my novels for young adults. From Colorado to Virginia, I have seen more disinclination toward conformity among high school students than I have among many of the adults I know.

Indeed, once teen-agers get into a Bill of Rights debate, they become ery stimulated toward diversity -- stretching their polemical skills in arguing with their peers about privacy; speech and press (you ought to hear them clash on the law of libel); and separation of church and state.

In far too many high schools, however, students are seen as too immature to be able to cope with "divisive issues" in their school newspapers, textbooks, and classrooms. And that is why, as many education studies show, an alarming number of kids don't know how to think, to analyze what they've "learned." Let alone how to think for themselves on "divisive issues." It's among just such students that the pied pipers of the cults harvest so many inert souls.

But under equal access to all kinds of ideas, kids are likely to become increasingly accustomed to thinking for themselves and to challenging notions made of smoke. They might even evolve into more independent-minded citizens than some of the folks who continue to infantilize them.

In "On Liberty," John Stuart Mill charged that state-sponsored education "is a mere contrivance for moulding people to be exactly like one another." Equal access can jam that contrivance. As Barney Frank said, the fabric of this society is not going to be damaged because "some teen-agers might decide to have a meeting of a radical political group while others might decide to have a meeting of a particular religious society. I think those of us who think teen-agers ought to be treated with some respect for their individuality ought to welcome this bill."

As most teen-agers will tell you, it's hard to find many adults who see teen- agers as individuals. But unwittingly, as is his custom, the president has signed a bill affirming that teen-agers are not fungible and can be trusted to think for themselves.