Most employers will understand that you might jeopardize your current job by using them as a reference. You can ask that they contact them only if they are offering the job to you. Some applications even have a place to indicate if they should wait to contact your current employer.
Unless you are on really good terms with the company, I would not ask them to be a reference. I would just do it. This is the only situation in which I would not ask beforehand.