I'm wondering how far does parody go in Canadian copyright act? Is copying someone else's open source code and modifying it then protecting it considered as infringement? The code is from a unregistered organisation.
It seems that you don’t understand what parody is. If you do understand, please explain how it’s even possibly to parody computer code.
What you can do with “open source” code depends on the licence the copyright holder(s) release it under. For some very permissive licences you can do what you suggest, for most, you can’t.