There are a couple of aspects to this. One is adding a list item, other is editing a list item.
If you are adding a list item, once it is added it is saved. Now that item can be searched for.
If you are editing, let there be an edit view where the search field will display results for all the editable and non-editable item(s).
Prompting to save the results when focused on the search field might not give a very good user experience.
Some cases where prompt can be used:
- User has not saved the changes and is trying to navigate somewhere else
- Confirmation(sort of)
Now, when the user clicks on the search field there is no such situation where there should be a prompt shown. The user is not doing something which will cause the unsaved data to be removed.
A better approach to this whole scenario would be to provide a edit view which will be meant just for editing. It will also have a search field which can be used to search over a list of editable/non-editable items. This way, a more focused design can be achieved and there would be less chances for the user to make a mistake. And if the user is navigating out of the edit view before saving it, you can show an alert saying "There are changes unsaved. Do you want to save it?"
Isolation can help project the design clearly. When the user enters the edit mode, move to a view where the list items are editable. Once it is saved, get back to the normal view. This way the user can search on data based on the view which is currently active.
Hope I could help with some thoughts if not the solution.
Edit details:
Changed answer to provide search on both edit and normal view.