Although subletting with the landlord’s permission is fine, you still need the landlord’s written confirmation for the Anmeldung. The Wohnungsgeberbestätigung must always be signed by the landlord, even if you are sharing a room with another tenant.