Can ghee replace butter in lemon curd?
Yes, you can; for example, from Charlotte's Lively Kitchen we have the following remark:

Can lemon curd be made with clarified butter?
OK, this is maybe a slightly unusual recipe adjustment to have tested.
However, I decided that as lemon curd is such a classic recipe, I’d
see how it was made in an old Victorian cookbook I was given by my
Granny, and that recipe used clarified butter so I thought I’d give it
a try.
It was delicious. However, I didn’t think it tasted like lemon curd as
we know it today so I decided to stick with regular butter.

Note that butter is about 80% fat, 18% water, and 2% milk solids (varies according to the butter).  So, you may wish to reduce the amount of ghee and adjust the moisture content based on your recipe.