I'm not 100% sure about my answer here since the situation you've described is rather unique.
Would deferring my offer prevent me from applying to any universities in 2019?
According to
this, it looks like you can sit the UCAT during an undergrad degree or after Year 12, so I'm giving a
very hesitant "probably not" to you deferring the BSci/MEng at Melbourne Uni affecting the UCAT application.
Please double check this information, as I am really unsure about my answer and would hate for you to do something based on purely my answer.
Also, side note: This is relatively new, since, if my memory serves me correctly, the UMAT (the predecessor to the UCAT) only allowed you to have one attempt and that was when you were in your final year of Year 12. I'm not sure what the protocol is now that the UCAT permits multiple attempts.
And if I were to receive an offer, would I be able to un-enroll from engineering?
Yes, AFAIK. You can probably double check with Melbourne Uni to be fully sure. If you do receive an offer for medicine, you would have to discontinue/ unenrol from the BSci/MEng at Melbourne Uni and enrol into your new medicine course.