You need a valid work permit in order to work legally. You need a valid Temporary Resident Visa in order to stay in Canada legally. Neither one substitutes for the other; you need both for different purposes. In your case, you have to apply to extend your TRV in order to continue working till June 18.