Can I subsitute grapefruit for either lemon or orange in baking
I'm sure you could but I don't think you'd be happy with the results. 

A quick breakdown of the amount of sugar and citric acid (gives the acid tang to citrus fruits) to grapefruit, orange and lemon juices per 100 grams (roughly 100 ml).


Grapefruit has 7-8 g. sugar and 2.5 g citric acid.  
Orange has 8-9 g. sugar and 0.9-1.7 g citric acid.
Lemon has 2.5 g sugar and 4.5-5 g    citric acid.


Please don't ask me to provide references as I soon discovered that no one site (or even 3 or 4) has the needed information together in one place. I had to search through multiple sites and calculate the differences on amounts given with different units used (ml vs oz). 

Comparing these differences, you might think grapefruit could be substituted for oranges if you added more sugar. What makes grapefruit unsuitable though is its bitterness. Grapefruit contains Naringin, the compound which gives it the bitter taste. In fact, naringin is the reason why people who take certain medications, especially some cardiac meds, need to avoid grapefruit or its juice as it can interfere with the liver's metabolism of these drugs.

But getting back to the suitability of using grapefruit, if you're prepared to adjust sugar and you don't mind grapefruit's bitterness,  it's worth trying. Best check, too, with anyone else who plans on eating the dessert. 

What works for me is to buy lemons on sale if they're good - heavy and juicy - grate all the rind, then juice the lemons and freeze them. Grated rind freezes very well and doesn't lose any flavour either. It makes it so much more convenient for me when I want to cook with lemons. I do the same with oranges, especially the rind. I also keep citric acid in my pantry as I use it often when I cook. It can be used with oranges to make a delightful orange meringue pie as regular oranges lack enough tang.