You will still need to join the tables. Try this instead:
$query = " SELECT inventory.instock FROM inventory "
. " INNER JOIN products ON products.item_number = inventory.id "
. " WHERE inventory.instock < 1";
It's a good practice to prepend the table names (or aliases) to the column names when you have multiple tables in your query. This is to avoid running into ambiguous column name errors if you have tables with columns that have the same name. And also it makes it easier to tell which fields belong to which tables.