Using a sample of dilepton top-quark pair (tt̄) candidate events, a study is performed of the production of top-quark pairs together with heavy-flavor (HF) quarks, the sum of tt̄+b+X and tt̄+c+X, collectively referred to as tt̄+HF. The data set used corresponds to an integrated luminosity of 4.7fb-1 of proton-proton collisions at a center-of-mass energy of 7 TeV recorded by the ATLAS detector at the CERN Large Hadron Collider. The presence of additional HF (b or c) quarks in the tt̄ sample is inferred by looking for events with at least three b-tagged jets, where two are attributed to the b quarks from the tt̄ decays and the third to additional HF production. The dominant background to tt̄+HF in this sample is tt̄+jet events in which a light-flavor jet is misidentified as a heavy-flavor jet. To determine the heavy- and light-flavor content of the additional b-tagged jets, a fit to the vertex mass distribution of b-tagged jets in the sample is performed. The result of the fit shows that 79±14(stat)±22(syst) of the 105 selected extra b-tagged jets originate from HF quarks, 3 standard deviations away from the hypothesis of zero tt̄+HF production. The result for extra HF production is quoted as a ratio (RHF) of the cross section for tt̄+HF production to the cross section for tt̄ production with at least one additional jet. Both cross sections are measured in a fiducial kinematic region within the ATLAS acceptance. RHF is measured to be [6.2±1.1(stat)±1.8(syst)]% for jets with pT>25GeV and |η|<2.5, in agreement with the expectations from Monte Carlo generators. © 2014 CERN, for the ATLAS Collaboration.