Show node IDs along with titles in Entity reference Autocomplete list
Install the Views and Entity Reference modules, create a new View and Add a Entity Reference Display:



Then Add in the fields the content title and the nid, click in the nid and check Exclude from display, Save and click in the title and go to rewrite the output of the title as [title] - ([nid])




Go to edit the settings of the format and check the title, this will allow you to search by title.



Save the view.

Go to edit your Entity Reference field and select in the Mode Views: .... (like the following image) and select your View (in this case the name is: articles_with_id) and save the settings:



Then go to see the result:



EDIT: This is now working in Drupal 8, at least in the version 8.3.4.