Hi Karen
I would definitely consider repairing the Z3....after all, they are going up in value.
Not sure which engine size it is and also how many cylinders?
If it has the four cylinder engine then these are cheap and plentiful and very easy to fit a new one....all in imagine you would be looking to fit a secondhand engine for around £650 to £750.
The alternative is to replace the piston or rings which again is an easy job on these engines but I would have a garage Leak Test the cylinder to determine whether it is a defective piston or valve (simple job to carry out with compressed air and see where it leaks from).
However, if it is the 6 cylinder engine as Dave has already talked about then costs would be considerably higher (much more complex engine).
I'm hanging onto my Z3 for both sentimental and also financial reasons and cannot imagine a day where I will part with it
Let us know how you get on with it
Cheers . Trevor