You are allowed to copy it, you just can’t sell copies of it.
Under fair-use laws (which vary country to country), you can usually copy a small portion of the work for non-profit educational use
You probably won't be in trouble until you start trying to distribute your copies, but the prohibited thing is copying. Hence the term copy-right.