The safest answer here is ‘always’! Although there are exceptions to copyright, where you can use a part of a work without infringing copyright, it’s generally best to check with the representative (a publisher or agent), collecting agency (i.e.ALCS, CLA, etc), or the author themselves.
A commonly known exception is the use of a short quote in non-commercial academic essays -- but these must be cited and fully acknowledged within the essay. This kind of use is known as ‘fair use’ -- bear in mind this is a legal term, not a subjective one, so it is still best to check.
More information on copyright and where there are exceptions from the rules can be found on the Intellectual Property Office's website here.