Either one. "6th period" is a name, so you can refer to it as just that, and it would be the most natural way to phrase it (at least to my American ears). But "in the 6th period" is a more formal way of expressing it if you are describing how your schedule works, for example, explaining how the time is divided during the day. So you would skip "the" with classmates, but to explain to an outsider unfamiliar with your school's typical schedule, you might say "in the...", but even then it wouldn't be required.