NACHA rules permit you to post such items, but they also permit you to return them if you meet the appropriate return deadlines, based on the mismatch of the Receiver name in the ACH record when compared to the name(s) of the owner(s) of the deposit account.
If the items in question are ACH credit entries from the U.S. Treasury, the rules are a little more demanding. The Treasury's Fiscal Service regulations at 31 CFR Part 210, section 210.8(d) indicate:
If an RDFI becomes aware that an agency has originated an ACH credit entry to an account that is not owned by the payee whose name appears in the ACH payment information, the RDFI shall promptly notify the agency. An RDFI that originates a Notification of Change (NOC) entry with the correct account and/or Routing and Transit Number information, or returns the original ACH credit entry to the agency with an appropriate return reason code, shall be deemed to have satisfied this requirement.
Note that this Treasury requirement has implications for direct deposited IRS tax refunds that you may detect that are headed for accounts not owned by the indicated taxpayer(s).