Breathers and rogue waves as exact solutions of a nonlocal partial differential equation of the third order are derived by a bilinear transformation. Breathers denote families of pulsating modes and can occur for both continuous and discrete systems. Rogue waves are localized in both space and time, and are obtained theoretically as a limiting case of breathers with indefinitely large periods. Both entities are demonstrated analytically to exist for special classes of nonlocal equations relevant to optical waveguides.