Within the framework of national accounts, you are correct in saying that only producers invest. This is true by definition. However, households are sometimes treated in national accounts as containing both consumers and producers (unincorporated enterprises), when it's not possible to separate the two.
As I explain in detail in an answer to a related question, when a person engages in productive activity (or when they acquire capital goods for use in production, i.e., invest) we try to the extent possible to separate that activity out, and say that that person is doing that in their capacity as part of a productive enterprise. When they consume, we count that as occurring in their capacity as a consumer.
It can be confusing, because there are two overlapping systems that appear in national accounts.
The first is the division between enterprises (producers) and households (consumers), in which households are treated as consumers and never as producers, as detailed in the other answer. This is considered to be the ideal, and the national accounts try to separate out households as consumers from households as producers to the extent possible, but it often can't be done for practical reasons. As a result, this division sits in the background, and accounts are generally presented in the second system, using accounting fictions when it's practical and important to reconcile between the two.
The second is the institutional view, which how accounts are generally presented. In this view, corporations (including quasi-corporations) are still never consumers. However, it's not always possible to split out the accounts of households between when they act "in their capacity as consumers" from when they act "in their capacity as producers." As a result, in this framework, productive activity that occurs in a household can be treated as a part of the household, as noted in the 2008 System of National Accounts. (p. 63):
Institutional units are allocated to sector according to the
nature of the economic activity they undertake. The three
basic economic activities recorded in the SNA are
production of goods and services, consumption to satisfy
human wants or needs and accumulation of various forms
of capital. Corporations undertake either production or
accumulation (or both) but do not undertake (final)
consumption. Government undertakes production (but
mainly of a different type from corporations), accumulation
and final consumption on behalf of the population. All
households undertake consumption on their own behalf and
may also engage in production and accumulation.
On page 83, they explain further:
As noted in the introduction, households are unlike
corporations in that they undertake final consumption.
However, like corporations, they may also engage in
production. Household unincorporated market enterprises
are created for the purpose of producing goods or services
for sale or barter on the market.
The relationship between the two views (consumer/producer) and institutional is then described:
An unincorporated enterprise can only be treated as a
corporation if it is possible to separate all assets, including
financial assets down to the level of cash, into those that
belong to the household in its capacity as a consumer from
those belonging to the household in its capacity as a
The desire to split out this activity to the extent possible is explained explicitly on p. 461:
All households undertake final consumption and all to a
greater or lesser extent undertake accumulation but a
household does not necessarily undertake production. To
the extent possible, the production activities within
households are treated as quasi-corporations, included in
one of the corporations sectors and separated from the rest
of the household. However, as explained in paragraphs
4.155 to 4.157 a quasi-corporation can only be created
when a full set of accounts, including balance sheet entries
and information about withdrawals of income from the
quasi-corporation, is available.
So, just so long as you're talking about consumers, it's true to say that they never produce, and thus never invest. If you're talking about households, in the consumer/producer framework it's not a household that is investing, it's an unincorporated enterprise that is contained within the household. In the institutional framework, productive activity is separated out when possible and just counted as part of the household when it's not possible. In this framework, households therefore always consume and sometimes invest, but they never invest in their capacity as consumers.