Who actually owns McLaren's M-B engines? Were they forced to give them back?

Would it be techincally possible for McLaren to keep them and make changes on them, themselves? Or would that be a violation of IP?