Is it possible for a layperson or an important person to put a cheirem on another person or does it have to be a Rabbi?
One need not be a Rabbi to place someone in Niduy or Cheirem (see Shulchan Aruch Yoreh Deah 334:34). However, there are a number of differences, for example, between a Rabbi's and a student's niduy/cheirem (see Yoreh Deah 334:15–16).
A person must know what he is doing before placing someone in Niduy/Cheirem. Because if you do it to someone that doesn't deserve it, you deserve to be put in Niduy (Yoreh Deah 334:43 – 24).
Yes anyone can put someone in cherem; it doesn't have to be a rabbi, and not even an important person.
The Rambam writes explicitly (MT Talmud Torah 6:13-14) that "a student" or "any Jew" can excommunicate someone.
If a teacher placed a person under a ban of ostracism because of his honor, all of his students are obligated to treat the person in the required fashion. However, if a student issued a ban of ostracism because of his honor, his teacher is not obligated to abide by the terms of the ban. Nevertheless, all other people are obligated to do so.
Similarly, when a person is placed under a ban of ostracism because of the nasi, all Jews are obligated to abide by the terms of the ban. However, if a person is placed under a ban of ostracism because of any Jew, the nasi is not obligated to abide by it.
See also 6:14
even if the ban was declared by a person of the lowest stature in Israel