On an afternoon in May, 34 protesters breached the locked doors of the administration building at the University of Chicago and dashed upstairs to the fifth-floor lobby of the president’s office. Sprawling on chairs and on the floor, equipped with food and chant sheets, they settled in for a long sit-in. The protesters, who were mostly students, demanded, among other things, a “living wage” for campus workers, more accountability from the campus police and disinvestment from fossil fuels.

It was part of a school year of student demonstrations across the country, often tolerated or even celebrated by members of the faculty or administrators. But this one was different: Days later, the student body president, Tyler Kissinger, who had allowed the protesters into the building, was threatened with expulsion the day before graduation.

“My parents are concerned because they don’t know if they should be coming to observe my graduation or not, or if I should be spending the few dollars to buy my cap and gown,” said Mr. Kissinger, 21, who is from Lewisville, N.C., and is a first-generation college student.

Administrators at other universities have been more accommodating in this year of unrest. Harvard Law School abolished its slavery-linked crest after protests, including a sit-in; Yale discontinued the use of the term “master” for heads of its student residences after protests; the president of the University of Missouri resigned after protests by the football team.