First, I'm assuming that they meant that the styling of the block around all the footer content (in particular, its background colour, borders, etc) should span the width of the screen - not that the text containers within the footer should be 1-column full-width and therefore insanely wide on wide devices. That'd be bad design because the measure of the text would be bad for readability:
For a single-column design measure should ideally lie between 40 and 80 characters... if [lines] are too long the content loses rhythm as the reader searches for the start of each line
As people have said, there aren't really any absolute design rules, but there are useful conventions, patterns and user expectations.
What I suspect this teacher was getting at, is that:
- ...if your footer, like most footers, contains standard information common to all pages and not specific to the content of this page, then it should have something that visually separates it from the 'page content', so that someone reading the whole content knows the page-specific content is finished and isn't left wondering "what does the fact this company is registered in Quebec have to do with a recipe for bacon cheesecake? Oh, right, I'm reading the footer now". A full-width change of colour is a common, easy, reliable way to achieve this.
- ...if your footer follows standard conventions and contains content like contact / about us info or links, social buttons, legal information etc, then it should stand out clearly against all the other possible page content so that someone fast-scrolling looking for this sort of thing ("Yeah, yeah, enough about bacon cheesecakes, which Canadian province is this company registered in, dammit? There's usually some bar across the bottom of the page...") knows when they've hit what they're looking for. A full-width change of colour stands out from any breaks you might have within your content and is an easy, common, reliable way to achieve this.
If you do have different needs, or another design that you have reason to think won't confuse users in these two cases, by all means do your own thing. Always think through how it applies to your case, though. For example:
- If content in your footer isn't like a standard footer, and is related to the page content (for example, maybe it contains links to related content that readers of this page are particularly likely to be interested in), you might be better off making it un-footer-like so that people who've read all your content and still want more do continue reading.
- Do you have any breaks within content, e.g. for adverts, or mid-content cross links or social tools? If they can be confused with footers, readers might stop mid-article thinking they'd reached the end. It can be good to keep the full width change in background colour holy so people know it and only it means they've reached the end.
- Be aware of never-ending scrolling patterns, like articles that auto-load a related article, and search pages that auto-load new results. If your footer does mark the end of the page's content but isn't sufficiently footer-like, people might mistake it for a break before new content loads.