We were given an assignment in an University program course which is not related to that course. Can I call the assignment as "extraordinary class assignment"?
Technically you could, but in this context, extraordinary more readily implies amazing, incredible, phenomenal, one-of-a-kind, that sort of thing.
As one of the comments mentions, extra-curricular would work better. You could also use out-of-the-ordinary.
Or, more in terms with what you're talking about—a totally separate assignment—it may be better served by a word like irregular, off-topic or unrelated.