Frank McCourt, the embattled owner of the Los Angeles Dodgers, and Major League Baseball agreed late Tuesday on a plan to sell the iconic team, which filed for bankruptcy last June after Commissioner Bud Selig rejected its plan to sell its future TV rights.