As far as I am aware, notice periods only apply if you are fit to work. If you deemed medically unfit for work, it would be foolish of your employer to require you to continue to work anyway. If someone had a stroke for example and could not longer work, they wouldn't be able to do anything about that - pregnancy should be no different.
Do you have holidays owing? My understanding is the only possible penalty of resigning without notice is losing any leave owing.