Perhaps another way to think about this problem is how to get the most information from the user from their first input, and use this to make it easier for them to complete the rest of the entry.
With this approach in mind, I would put the ingredient type first, as an autocomplete field, then dynamically restrict the unit dropdown based on the ingredient selected. Therefore, the user enters the information in a logical order (item, amount, unit), and the options available to them change dynamically, before they open the dropdown.
Let's take your examples. The first column is an autocomplete, the second a plain input field, and the third shows the possible options for a dynamically restricted dropdown.
Item Value Unit
------------------------------
Milk 50 [ml]
[cups]
[teaspoons]
Eggs 2 [disabled]
Salt 1 [g]
[teaspoon]
[pinch]
------------------------------
For an item that you haven't pre-defined a restricted unit list for (e.g. myrhh), you can just display the full list and allow the user to choose. Hopefully this would be an edge case.
I wouldn't bother making the unit dropdown an autocomplete, unless the number of items is extremely large. The item field does deserve an autocomplete, however, as it is likely to be large.
Going forward, I would inspect the database to identify the most commonly logged items that do not have a hard-coded restricted item list, and use this to improve your application in subsequent releases.