What I understand about this topic is the following steps: Step1: Initially we make a decision to invest in a specific asset by NPV method, using the WACC.
Step2: Then we decide whether to lease or buy that asset (It is financing decision therefore we use the cost of borrowing for the buying option). Here we select the least cost financing option from the lease or buy options by their NPV.
We use after tax cost of capital or borrowing as we will get tax savings.
Please let me know if I need any correction in summing up this topic.