Yes, it's true. There are some circumstances under which New York's courts have extended the term of a non-compete agreement beyond the time set forth in the parties' underlying, original agreement.
But, as you could (or should) surmise, those circumstances are extremely limited.
The primary reason that the courts are loath to do so is the litany of precedent from New York State's highest court - the Court of Appeals - directing the lower courts not to rewrite the parties' contract at variance with its terms, particularly for the purpose of affording one party broader relief than it had bargained for, Chimart Associates v. Paul, 66 N.Y.2d 570, 573–74, 498 N.Y.S.2d 344, 489 N.E.2d 231 (1986)(collecting authorities); George Backer Mgmt. Corp. v. Acme Quilting Co., Inc., 46 N.Y.2d 211, 219, 413 N.Y.S.2d 135, 385 N.E.2d 1062 (1978)(“freedom to contract would not long survive courts' ready remaking of contracts that parties have agreed upon”).
On the other hand, there are very narrow holdings where New York's courts extended the non-compete agreements beyond their initial term, but the circumstances were rather extreme. For example, in New York Real Estate Inst., Inc. v. Edelman, 42 A.D. 3d 321, 839 N.Y.S. 2d 488 (1st Dept. 2007), the court noted that the “defendant hid his ownership interest in the competing ... [ business] for the entire two-year duration of the non-compete agreement,”and there was undeniable proof of his conduct of the competing business, a real estate school, for the entire two year period.
Needless to say, adducing the kind of proof marshalled in Edelman is extremely rare. Therefore, under nearly all circumstances, it is rather safe to assume that a court would NOT extend the term of a non-compete agreement in New York.