PieFed and Lemmy are different software platforms for interacting with the Fediverse (of which they are both separate parts). It's a bit like how Spotify and Tidal are both for streaming music, and you can see the same artists on both, but you can't use Spotify's app to sign in to Tidal. PieFed's API is fairly similar to Lemmy's, for the routes that it covers, but not exactly the same, so you can't use Lemmy apps with PieFed, or PieFed apps with Lemmy.
(edit, just 'cos LW is being a bit slow.)