Can you be dismissed from a graduate program for attending jury duty?
Serving on a jury is considered a crucial civic duty - I think it would be extremely damaging for any university to directly or indirectly punish a student for serving on a jury.

That said, it is possible that an institution could disagree with how much jury duty impacts your friend. It would be quite another thing for a school to dismiss a student because they missed a specific date of class, but that is different than a project that is worked on over years. That is, they would not be dismissing them for participation as a juror, but for insufficient progress during all the other time they didn't spend on a jury, deciding that the time spent on a jury was not substantial enough to impact performance. Serving on a jury for 1 week wouldn't require a university to give another semester-long extension.

Assuming you are referring to the U.S.: it might depend on your local government, but it can be possible to defer more than once or to be excused entirely if the courthouse agrees. There is often a limit but in places I have lived it was not limited to once. 

Usually the phrasing for getting deferred is something along the lines of "undue hardship" or "extreme inconvenience" which certainly applies to a graduate student nearing the end of their program.

If your friend can't defer and has to report, there are also at least some anecdotes and rumors that academics are likely to be rejected from juries for a number of reasons, though I am not aware of any social scientific study of this phenomenon. I would also add that long jury service for anyone is pretty rare - most court cases are fairly simple, and jurors may not even serve on a case if they are not selected or there is not a large number of jury trials during the time of service.

I am not aware of laws that protect grad students specifically, but this is really a question to ask a lawyer rather than Academia.SE. There might be local laws that effectively count grad students as protected employees, but I think it's likely to be a gray area due to the temporary and not-really-employee status of grad students. More likely, your institution or graduate school has some of their own policies regarding jury duty - I would suggest you or your friend consult those policies.