Yes, RBS can be used in Agile project management but iteratively. Rather than planning an RBS for the complete project simultaneously, create an RBS for the sprint. This will provide a stable framework for resource planning for the sprint while keeping the Agility intact by planning for short sprints iteratively.