Unless the line item has a specified status, you can allow users to add an attachment to the record only and prevent the users from adding attachments to line items.
Check the following items on the Options tab:
- Attachments to overall record: Add and (optional) Remove attachments
- Line Items: Allow Modify Line Items, except when there is a specified status.