I made a lemon cake and used a little bit of lemon rind. I had the lemon in my fruit basket for around a month, it still had it's shape and colour so I thought it was alright and decided to bake a lemon cake so I grated some lemon rind. Once I cut the lemon in half, a little section of it turned to a light brown colour so I discarded it. The cake has come out of the oven and tastes fine, although a little bitter from the lemon rind. Is it safe to eat? The lemon was only a little bit spoiled.
Of course if an item is spoiled this means you should throw out anything that contains the spoiled item. However, based on your description, I have an alternative hypothesis. Brown discoloration in fruit does not mean the fruit is spoiled. Discoloration can be normal, especially if there was no unusual smells or changes in texture in the lemon. You said the lemon still appeared fresh on the outside.
The more likely scenario is that the bitterness is from the lemon rind itself. The white pith underneath the outer bright yellow layer of the lemon rind is very bitter. If you go too deep while zesting a lemon your dish can easily be ruined by nasty bitterness. Only scrape the outer yellow surface when zesting a lemon. This can be quite challenging and takes some practice before you start zesting like an expert.
Without a further description of the lemon, it is impossible to say whether it is spoiled or not (it very well could be), but even if it was I doubt the spoiled lemon is causing bitterness (it would probably cause a different but equally undesirable flavor).
Spoiled means that some sort of bacteria has started growing to the point where it is noticeable in the fruit. There is no way (short of a lab test) to determine if the bacteria will make you sick or not. You might be fine, and you might get really sick. I would not eat the cake.