As far as I know once they have made you job offer, they cannot take it back because you are pregnant- this would be discrimination. A friend of mine went for teaching interview at 9 mths pregnant, got the job and straight to maternity leave- this was a permanent position though.
If the position you've been offered is from now until next March- you really are talking about just teaching to the end of this academic year. You would be on maternity leave until March anyway unless you planned to go back to work early.
I guess if they offered you the position on the understanding that you are available for the year, then it leaves you in awkward position.
Perhaps they might be happy enough to employ you from now til end of June.
I don't really understand your question really- if you are thinking of accepting the job of course you must tell them- I don't see you have any option-you're 4 months pregnant, it is not like you can keep it secret for too long and you'll just leave yourself in bad position with them as you didn't reveal at the beginning and you would have accepted the position in the full knowledge that you would not be able to do what you had accepted.
You have done nothing wrong- a job interview last year, they contacted you offering you work and you happen to be pregnant- nothing wrong with this. It's life...
Accepting the job in the full knowledge you wont be able to do what they are expecting of you is dishonest I think and will go agains't you far more I think than being pregnant.