The brief answer to this is… maybe.
If you’re travelling from England, returning to England, and any stops you make on the way are either in a country where yellow fever isn’t present (eg the Netherlands, with KLM) or is a country where it is present (eg Kenya) but where you’re staying for less than 24 hours, YOU WILL NOT NEED A YELLOW FEVER INOCULATION.
If, however, you’ve stayed for more than 24 hours in a country where yellow fever is present before visiting Tanzania, then YOU WILL REQUIRE A YELLOW FEVER INOCULATION.
So which are the countries where Yellow Fever is present?
Angola, Benin, Burkina Faso, Burundi, Cameroon, Central African Republic, Chad, Cote d’Ivoire, Democratic Republic of Congo, Equatorial Guinea, Ethiopia, Gabon, Gambia, Ghana, Guinea, Guinea-Bissau, Kenya, Liberia, Mali, Mauritania, Niger, Nigeria, Republic of Congo, Senegal, Sierra Leone, South Sudan, Sudan, Togo, Uganda.
In the Americas
Argentina, Bolivia, Brazil, Ecuador, Colombia, French Guiana, Guyana, Panama, Liberia, Paraguay, Peru, Suriname, Trinidad and Tobago (Trinidad only).
Of course, matters are further complicated by the fact that those officials at the Tanzanian airport to which you fly into may either not be completely aware of the rules; or they may be aware, but will nevertheless demand that you have an inoculation even when you don’t need one. Why? In order to extort a little bribe from you. They know you’re tired from your flight, they know it’s probably your first time in Tanzania; and they know that few things scare tourists more than a hypodermic needle being waved in their face in deepest, darkest, HIV-riddled Africa. This rarely happens now, to be fair – the last report we got of this occurring was about three years ago – but it is still a possibility.
Our advice, therefore, is to confirm 100% whether you need one or not, and if you’re certain you don’t, then stand firm and make it clear to any official disagreeing with you that you know the rules. Good luck!