Is there a directory where, if I put files there, they will be on the Yun's internal flash instead of the SD card? ex. No SD card error handler file.
I'm using openssh-sftp-server for a sftp server, if relevent.
As root you can write to anywhere you want. As a normal user you can write to anywhere that user has permission to write to (their own home directory normally).
However, what you are asking is pretty meaningless at the moment, since you don't mention what the file should be, what it should do, how it should be used, etc. Just placing a file somewhere on the flash is a meaningless operation unless you have something else that is going to then access that file - and that "something" may have special requirements about where files are placed.