"For dessert, I'll have a slice of lemon cake."
Translation:En dessert, je prendrai une part de gâteau au citron.
"Une tranche" is specific for a long cake like this: https://assets.afcdn.com/recipe/20200218/107839_w312h230c1cx960cy540cxt0cyt0cxb1920cyb1080.jpg (it works for sausage too for example, any food that is "long" and you cut like this).
"Une part" is more generic, for example this type of cake: https://static.750g.com/images/320-250/22597aae5919bc9781118995d412e227/sponge-cake-ou-genoise-a-garnir.jpg or a pizza, but it works for the above long cake too, so it's probably more natural to use this word.
The specific English expression "I'll have" for politely asking something cannot be translated in "j'aurai". The equivalent is definitely "je prendrai".