From (Mahayana) Rice Seedling Sutra:
Here, what is ignorance? That which perceives these same six elements [earth, water, fire, wind, space, and mind] as a unit, as a lump, as permanent, as constant, as eternal, as pleasant, as self, as a being, a soul, a person, a human, a man; I-making or making “mine”, along with the many other such variations of misapprehension, is called ignorance. The presence of such ignorance brings desire, aversion, and delusion toward objects. Such desire, aversion, and delusion toward objects are the formations caused by ignorance.
...
They are called ignorance in the sense of obscuring.
...
Furthermore, not knowing reality, in the sense of not apprehending it and misapprehending it, is ignorance. If such an ignorance is present, three types of formations develop: those that lead to meritorious states, those that lead to unmeritorious states, and those that lead to immovable states. This is what is meant by ‘ignorance causes formations.’
...
There are four links that serve as the cause for assembling this twelvefold dependent arising. What four links? Namely, ignorance, craving, karma, and consciousness. Consciousness functions as a cause by having the nature of a seed. Karma functions as a cause by having the nature of a field. Ignorance and craving function as causes by having the nature of afflictions. Karma and afflictions cause the seed of consciousness to grow. Here, karma functions as the field for the seed of consciousness. Craving moistens the seed of consciousness. Ignorance sows the seed of consciousness. Without these conditions, the seed of consciousness does not develop.
My commentary:
Here ignorance is explained as assuming person to be a lump, a unitary object. From verbal explanations I know this idea of "lump" refers not just to persons but to inanimate objects as well. This is why the texts says "The presence of such ignorance brings desire, aversion, and delusion toward objects." - because reifying experience as objects is the foundation of craving. We assume that experienced entities are solid, we see them as solid, while in fact they are transient bundles of processes. Because we see them as solid we assume they possess those qualities that give us pleasure and pain (instead of correctly understanding that pleasant and painful qualities do not belong to objects but arise from a certain context which among other conditions includes our state of mind). Assuming the objects give us pleasure, we crave them and pursue them. In Pali Canon this is called papanca - objectifying something and thus making it into an object of pursuit (or avoidance).
Other Mahayana texts (e.g. my beloved Lamp of Mahamudra) talk about something called primordial non-differentiation which refers to a complete lack of consciousness in the sense of differentiation or recognition of individual phenomena. At this stage even entities are not delineated yet, but once delineation starts to develop, it does not become mature right away but goes through many phases of developing, starting from the very childish delineation of entities and assuming them to be solid and all-important, and slowly acquiring ability to "see" the hidden processes and relationships underlying the coarse entities.
Objectification and a sense of self go hand in hand, which is the whole point of D.O. (according to Mahayana interpretation) - objectification of experience as "external lumps out there" co-arises with its logical complement, the objectification of the "soft" aspects of experience (thoughts, feelings, associations, impulses - traditionally known as the five skandhas) as "subject" or "me". The two sides co-develop in dependence on each other, and this is why it's called dependent co-arising.
So, not all forms of dukkha arise because of a sense of self, but all forms of dukkha arise because of the objectification (and more broadly, reified generalization) which is always approximate (=somewhat incorrect) and therefore prepares the ground for a mismatch aka conflict (between different models and between models and reality), by creating incompatible pieces of information that eventually clash in the same scope, which is then experienced as dukkha.