What sort of professional boundary should I set with other students when I am a grader for a class I will be taking?
Actually, I think the best course of action would be for you to decline this offer. You have different personal relationships with different people in the class and it will be difficult to put aside all of your unconscious feelings and grade in a completely unbiased manner. It also opens the possibility of your friends putting pressure on you, which you can resist, but which could become uncomfortable. 

An exception would be for grading that is purely objective, not requiring any analysis or judgement of the quality of the answers, such as mechanically recording the answers in multiple choice questions. 

However, if blind grading could be arranged so that you grade paper not knowing who wrote them, then my reservations would probably disappear. 

Blind grading would leave you free to interact normally with study groups and would lessen or remove any pressure that could be applied against you. 

At a minimum bring up such concerns with the professor and point out the uncomfortable position it puts you in. 



Perhaps there is a possibility that you help out the prof by grading a different class and suggesting you grade this one in a future offering.