No, the incumbent can in fact be passed over in favor of someone else. This happened a few times in the 19th century. John Tyler had alienated both major parties and had no chance of renomination. Democrats were disillusioned with President Pierce and rejected him. James Polk had pledged to be a one term president and Millard Fillmore who had ascended to the office upon the death of President Taylor was in the unenviable position of being passed over by everybody. Chester Arthur, who had become president on the death of Garfield, supposedly was passed over for health reasons. In 1976, Gerald Ford came within a handful of delegate votes of being knocked off the ticket by Reagan. So, it doesn't have to be automatic for a sitting president to receive the nomination of his party.