It depends on how formal the wedding is. For a formal wedding you might be more comfortable in a long dress.
Otherwise, your cocktail dress would be fine for a wedding. You might want to cover up your shoulders if the ceremony is in a church or temple.