Is it legal to not pay for the the 8 hours in excess of 16 on week 2
if the contract specifies 8 to 16 hour work weeks?
To me it seems legal, but unfair, since that the hours average to 16/week in the end.
Generally speaking, the contractor would have a viable claim of unjust enrichment and/or breach of contract. Claims of unjust enrichment are cognizable in Canadian jurisdictions. Basically only the contractor's actual non-performance of previous workload reasonably assigned to him would justify withholding payment of the excess hours.
Unless the contract explicitly prohibits overtime, the extra hours worked in Week 2 could
constitute an implied contract on its own as legitimized by both parties' conduct. Moreover, the fact that the excess hours in one week roughly coincide with the reduction of hours in other week suggests is indicative of the company's unlawful intent to game the system. A claim of unjust enrichment would ensue regardless of the weekly average of work hours.
The belief that "Fairness is not legally relevant" is very mistaken, especially in contract law. Contract law is premised on the well-known covenant of good faith and fair dealing. Even in claims outside the doctrine of contract law, an injured party could prevail in equity unless statutory law or case law provide otherwise.
Edited on 1/14/2019 to address the OP's added quote of the contract clause
Due to the difficulty in answering, I will provide the specific
clause:
The Contractor shall work on an estimated 16 - 24 hours per week or as
requested by the Company. All extended hours to be rendered by the
Contractor shall be pre-approved by the company, in writing.
This added clause creates confusion because hitherto the question only referred to the range of 8-16 hours per week. That being said, the doctrine of contra proferentem compels the company to pay for 24 hours of Week 2 --as sketched in your example-- unless the contractor is the draftsman of that contract (the way how this clause is worded suggests that the party who drafted the contract is the company).
Unless the contract defines the term "estimated" otherwise, the commonplace meaning of "estimated" permits the reasonable interpretation that only the work in excess of 24 hours can be considered "extended hours". If the contractor works 24 hours in a week, he clearly has not exceeded the benchmark of 24 hours and therefore did not need to "be pre-approved by the company*". Therefore, the company has the obligation to pay the full 24 hours of Week 2.