Yoast SEO checks ‘edit_files’ capability before allow user to work with its ‘File Editor’.
Take into account that any mistake in .htaccess file may lead to site blocking. You need to think twice before allow direct file editing at the live site.
Btw., ‘edit_files’ allows to edit inside WordPress themes and plugins file.