Pineda, 28, plans to get a second opinion before opting to have the season-ending procedure, but Yankees general manager Brian Cashman said the team has recommended surgery.
Pineda's last start was on July 5 when he gave up nine hits and five runs in just three innings against the Toronto Blue Jays.
Pineda is 8-4 with a 4.39 ERA and 92 strikeouts over 96 1/3 innings in 17 starts this season. He was 6-2 with a 3.32 ERA in the first two months of the season.
The Yankees have lost 17 of their last 25 games and are 3 1/2 games behind the Boston Red Sox in the American League East.
Cashman told reporters prior to Friday night's road game against the Red Sox that the Yankees will be "careful buyers" as the July 31 trade deadline approaches.
The Yankees also announced first baseman Greg Bird also is seeking a doctor's second opinion about having surgery for inflammation in his ankle.
Cashman said Bird will either need surgery that would keep him out at least another two months or will get another cortisone shot to get through the season.
Bird, 24, is hitting .100 (6-for-60) with one home run and three RBIs in 19 games. He missed all of the 2016 season after having shoulder surgery and was placed on the disabled list May 2.