Consciousness is a strange topic. It is virtually impossible to learn much about it without experiments. Mere introspection -- using the tool to measure the tool itself is fraught with difficulty.
There seem to be two different things that people talk about when they mention consciousness.
The first would seem to apply to every creature that can be rendered unconscious. There is now good experimental evidence that even flies have conscious intention. My personal view, arrived at tentatively over many years is that consciousness has to do with a feedback system that directs attention in order to make possible the most efficient use of a brain — a trick developed by evolution to get best use out of energy-expensive neurons. If that is the case, it makes very good sense that insects would have it because space and energy are at a premium in such small animals.
When a mosquito lands on you to steal some of your blood, try this experiment: attempt to immediately swat it. It will most likely evade and escape. Then, next time one lands on you, first watch it for a while. It will initially wait for a moment seemingly on high alert, then it will set about looking for a good spot to drill for blood. If you swat it now, before it has actually sunk its proboscis into your skin, you have much greater chance of success. Why? A mosquito's eyes don't rotate. They always look in all directions at once. But if the animal's attention focusses in a different direction, changing from being wary of danger, to seeking blood, then you would expect you might have extra milliseconds in which to catch it by surprise. If it was a little robot it could respond to a threat instantly, no matter what else it was doing. There must be strong evolutionary pressure to respond immediately as a little robot. So why would there be any evolutionary pressure to do otherwise and risk death? I think it comes from the great benefits of re-using neural machinery. Nerves are very expensive to run. About a quarter of our energy intake goes to merely maintaining our enormous brain. For a tiny creature like a mosquito, needing less nerves while still being capable of a great variety of adaptive behaviors is a tremendous advantage. Evolution seems to have developed attention as a trick to re-use nerves for multiple functions. And I find it very difficult to imagine attention existing without consciousness.
As for the second category: consciousness as the mind watching itself... that is a hall of mirrors, and it is very easy to get lost. One of the strangest things about this is that the actual conscious thoughts themselves appear to arise unconsciously. Sam Harris illustrates this conundrum very well when he explains that we actually have no free will. Think of something to say. I might decide to mention the echidna — the cute little egg-laying, ant-eating, mammal covered in spines that lives around here, and much of Australia. Why did I think of it? It came unbidden into my mind. It had no conscious origin. It simply appeared. When I write a sentence, I generally don't know how it will end and what words I'll choose to get there. It all falls into place without conscious choice. I often consciously review words and reject them for better ones, but how do I choose them? And how do I actually decide that one is better? My consciousness seems to be observing and directing attention in a mostly unconscious process. I don't even seem to be conscious of how I'm directing my attention.
Another strange thing about the mind watching itself is that we are tempted to call it a "higher" form of consciousness, yet the times when we feel our consciousness is at its peak is when it virtually disappears and becomes subsumed in some task. Athletes describe this as being "in the zone". Musicians experience it too. When I'm deeply involved in writing a computer program I feel it. My consciousness of myself disappears and I am completely absorbed by the task. It can be exhilarating. Lovemaking can do it too.
Do other animals have self-consciousness? Almost certainly... at least those members of a special club: elephants, the other apes (chimps, gorillas, bonobos, orangutans, gibbons), dogs, crows, parrots, dolphins, pigs, and probably octopus and monkeys, perhaps squid, maybe elephantfish, cows, sheep... Smartly designed experiments can show that to us. Dab two dots, one of paint and the other a bit of clear water on the forehead of an elephant then show it a mirror. It will look at its reflection and reach up with its trunk to rub the paint spot. It recognises itself in the mirror and shows self-awareness.
Do small animals like spiders show self-awareness? Who knows? It is hard to think of experiments that can reveal it to us, but some of them are capable of extraordinarily complex behavior. Watch a cute little jumping spider stalk its prey. They appear to think ahead and plan. Watch a mother centipede clean fungal spores off her eggs in her nest. She has to delicately pick up each egg and rotate it without puncturing it, licking the surface clean. Imagine the complexity involved in ants living in snowy country moving the aphids that are their "cattle" from the branches of the plants that are shutting down for the winter, and taking them down into their burrows to place them on the roots of those plants. It doesn't explain anything to say "Oh, that's just instinct." Our urge to speak is "just instinct".
I think consciousness is almost universal among animals that have some kind of brain, and I think self-awareness is much more common than we chauvinistically like to think. I've never understood the eagerness of people to assume that consciousness and self-awareness are ours alone. It seems obvious that this isn't the case. Why would they even want us to be "special"? It seems childish and willfully ignorant.