You can choose no targets for The Bath Song's final chapter ability just to add 
. However, if you do choose targets, and all of those targets are illegal at the time the ability tries to resolve, the ability won't resolve and none of its effects will happen. You won't add 
.

Artwork
Loading artwork…
The Bath Song
The Lord of the Rings: Tales of Middle-earth · #40 · EN
Nonfoil—Foil—
Card rules
(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)
I, II — Draw two cards, then discard a card.
III — Shuffle any number of target cards from your graveyard into your library. Add 
.
Uncommon · Illustrated by JB Casacop
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
The Bath Song's final chapter ability is not a mana ability. It uses the stack and can be responded to.