Yes you can, but probably shouldn’t. I would instead suggest using either a virtual machine, or a “workspace container” (my term).
Related: