The answer to all your questions is yes:
- you can store pdfs or other files either in Content Builder or in your sFTP
- you can use AMPscript to attach the files to your emails
- you can use AMPscript to dynamically match subscriber data with files and to create conditional statements
- you can match a file based on a filename, customer key, etc.
Some examples can be found in the ampscript.guide: https://ampscript.guide/attachfile/
Here is one of the examples from ampscript.guide:
This example attaches a Content Builder asset by Customer/External Key:
%%[
var @customerKey, @fileAlias
set @customerKey = "LoyaltyMembersCB"
set @fileAlias = "LoyaltyMembers_ContentBuilder.zip"
AttachFile("ContentBuilder", @customerKey, @fileAlias)
]%%
Make sure to contact SF support to enable attachments in your account first.