Vegetable and fruit consumption in childhood remains below recommendations in many countries. As the intake of fruit and/or vegetables during childhood in a few studies was associated with breastfeeding, it may be suggested as a serious interfering factor while analyzing the association between breastfeeding and its long-term health effects. Thus, it may be important for creation and implementation of effective public health programs. The aim of this study was to evaluate the association between breastfeeding and consumption of fruit or vegetables in later childhood. The study was conducted within the Project “ABC of Healthy Eating—ABC of Kids and Parents” among a representative sample of 703 pairs of mothers and children aged 7–12 years in Poland. A systematic purposive-quota selection according to gender, age, place of residence, and region of Poland was applied. The study was conducted by interviewers in the respondents’ homes in 2017. Logistic regression analysis was conducted, and models adjusted for children’s age, BMI centile and gender, maternal education, employment status, and economic situation, as well as for EU–28 average Gross Domestic Product (GDP) region. Almost 86% of children were ever breastfed. Vegetables for breakfast, second breakfast, dinner, supper, and between meals were consumed by 23.9%, 18.6%, 47.4%, 26.7%, and 4.0% of children, whereas fruit was consumed by 13.9%, 46.1%, 7.7%, 12.9%, and 59.7% of children, respectively. Breastfeeding for a period of 4–6 months increased the chance of vegetable consumption for breakfast in the whole group (aOR 3.80, 95% CI 1.90–7.59, p ≤ 0.001) and particularly in girls (aOR 4.60, 95% CI 1.43–14.75, p ≤ 0.01) when compared to boys (aOR 3.17, 95% CI 1.32–7.63, p ≤ 0.01). Longer duration of breastfeeding (over 12 months) increased the chance of vegetable consumption for dinner in the total group (aOR 2.36, 95% CI 1.30–4.26, p ≤ 0.01) and particularly in girls (aOR 3.04, 95% CI 1.24–7.46, p ≤ 0.01) when compared to boys (aOR 2.20, 95% CI 1.01–4.95, p ≤ 0.05). We showed a positive association between breastfeeding and vegetable consumption for breakfast and dinner among children aged 7–12 years. These associations were gender-specific (stronger among girls) and were not diminished by socio-demographic factors.