Translation:Please give me a piece of chocolate cake.
When translated to English, couldn't "a slice" instead of a piece also work? Although "a piece" is a direct translation from the Chinese sentence, I feel like "a slice" is also somewhat synonymous with "a piece".
I agree. I had "please give me a slice of chocolate cake" and it was rejected. I think slice of cake is more commonly used than piece of cake
indeed in other questions the preferred translation of 一块...蛋糕 is "a slice of ... cake"
I put 'one piece' instead of 'a piece' and it was incorrect. Am I wrong?
You are not wrong. Although, using "one" instead of "a" here gives me the feeling that you are emphasizing the fact that you want just one piece, as though someone was trying to hand you the whole cake or something.