In 7 Wonders, when using a Leader to build Babylon (B)'s second stage before Age 3
No, you are not allowed to play a Leader.

From the base game rules, page 9:


  The Hanging Gardens of Babylon
  · the second stage gives the player the option of playing their seventh 
  Age card instead of discarding it.  


From the Leader rules, page 3:


  Leader Cards
  The Leaders (white cards) are a new card category. They are not added to the Age cards and have a different back to set them apart.


See the bold parts: Babylon (B) allows you to play an Age card, but Leaders are not part of the Age card set.