Here's one formula you can try out, using it as the custom function for conditional formatting:
=ROWS(FILTER($A$2:$B, $A$2:$A=D1, $B$2:$B>0))>0
FILTER selects the rows of the ingredients list with that name and quantity >0; ROWS computes the number of such rows.