There are so many wrong answers in this thread.
An EU citizen only needs proof of citizenship to enter the EU. That can be a government-issued ID card or a passport. It doesn't actually matter too much if the passport or ID card has expired, as long as the immigration officer can satisfy themselves as to your identity.
Whether or not the entry to the EU is at a Schengen border or not is completely irrelevant (although since most of the EU is now in Schengen it will generally be a Schengen border). Nor does it matter if you are arriving from the UK, Ireland, the US, or China.
Source 1: DP and I both have EU passports and ID cards, and we regularly enter from both the UK and non-European countries on our ID cards as they allow you to bypass the queues for the e-gates.
Source 2: The attached extract from the EU's very readable document entitled "Practical Handbook for Border Guards" which you can download from here [PDF].
In terms of what happened to the OP, I can only assume that the Lanzarote border officials had read about the rules that the UK now applies ("everyone needs a passport to enter the UK") and therefore decided to reciprocate for some reason. Lanzarote has been in the news because it turned out that since Brexit they have not been giving UK passport holders exit stamps, leading some people who come back from holiday there to be accused of overstaying when they next visit the EU. All of this will be fixed when EES finally goes live and stamps become a thing of the past.
(Of course, "everyone needs a passport to enter the UK" is also wrong. Irish people don't need a passport. Nor do the 1.5 million or so EU citizens with the right to remain after Brexit who came to the UK on just their EU ID cards and still don't have a passport, for the most part. But sometimes these people have trouble getting on the plane at the EU end because the check-in person doesn't know the rules...)