Yes, a transaction can be made anonymously. 

If a constituent generally makes their donations or purchases anonymously, you can check the Gives Anonymously box on their profile screen. For each new transaction, the Anonymous field will be selected for you. You can then change it for a specific transaction if the constituent does not want to remain anonymous. If a constituent requests that a specific transaction be anonymous, you can set the Anonymous field to “Yes” on the particular transaction. The Gives Anonymously field on the profile does not need to be checked. 

Marking a transaction anonymously does not exclude it from any lists. You must filter anonymous transactions or constituents from the Transaction or CRM grids using the anonymous column if you do not wish the name to be shown in a report.