I'm looking for a place in Tanzania that has the same qualities as Zanzibar (beach, food and rest), but preferable with less tourism and maybe even cheaper prices. Preferable somewhere with access to lodges at the beach. Does such a place exist?
When I was travelling in Tanzania, some local people recommended Pangani Beach as an alternative to Zanzibar. It's located in the Tanga Region, and it is supposed to be much quieter and less touristy.
I didn't go there myself - we opted to do Zanzibar instead. If you do decide to go to Zanzibar, Nungwi is definitely the most touristy spot. Kendwa is a few kilometers away and is quieter, but still has enough to do to keep you occupied. Note that when I say Nungwi is touristy, I mean that there are about 20 hotels lining the beach - that's pretty much of it. As soon as you step off the beach however, you're in a local village.
Not Tanzania, but nearby Kenya has Lamu, another island along the cost. It's smaller than Zanzibar, but was settled by the same people, so has most of the same style of tiny cramped streets. You may be able to find some beach side hotels there, but since it's so less touristy, selection might be limited. I know it's hard to get beer on Lamu. I can't say I found Zanzibar expensive though. And if you have white skin you'll attract attention all over the place in Africa, so it might be less "touristy" but you'll still get hassled.
It should be obvious from yhe other answers to this question, but for the sake of clarity, there is no alternative to Zanzibar in Tanzania that is even remotely comparable to Zanzibar.
You probably have two options only: the beach south of the bay from Dar and Bagamoyo, some 60 kilometers north of Dar. Everything else is so remote, they might be interesting in their own right, but also won't be a real alternative to Zanzibar in any way. You might get good beaches, but the quality of your accommodation will be bad or very expensive and food will also be very limited or very expensive.
I can second the Bagamoyo thing, as I had already friends who went to the coast of TZ but had no time to visit Zanzibar. They felt really comfortable for the three days they've stayed there as Bagamoyo provides a good mix of Swahili-lifestyle, the open sea with a long and beautiful beach, peaceful places, a good variety of foods, young people from the university of arts and even some colonial architecture (e.g. the ancient German graveyard, settled right beside the beach). Oh, and it's only about 2h away from Dar es Salaam (public bus-transfer is provided) and if you take care of getting in contact with the people, they'll tell you how to get to Tanga (suggested above).