I would absolutely tell them. If you'd like to go back to that job, they will appreciate the honesty up front. Something lacking in many employees these days sadly.
Just say, you're really sorry, you've just found out you're pregnant, you'd really like the job. Timing it lousy, but you were not expecting it. Something along those lines.
Don't stitch the employer up as they'll always hold it against you, could cause an unhappy work environment. Not worth it.
Be honest, be decent. Apologise and plead.