I was wondering if there is a way to use participant attributes to display questions and apply logic to questions when a survey is set to Anonymous?
Short answer: You can't.
Long answer: If you can pass data from the token table to the answer table / or use attributes from the token table in the survey, you have a connection between the participant table and its personal data with the responses.
If this is the case, a technically anonymous survey can not be guaranteed by Limesurvey, because you could put personal data into any attribute, pass it into the survey and store it there. This way you would break the anonymity of a survey that Limesurvey says is anonymous. But it isn't. This would totally break the anonymous mode.
So at the end, you want a "non-anonymous anonymous mode", which doesn't make sense from a technical standpoint.
Now, we as market researches have similar problems as you describe. We need to be able to connect personal data or data about the respondent with the response data. And there comes what I call "ethical anonymity" into play. While we could connect response data with personal data, we follow the ESOMAR code of conduct, which requires us to separate personal data from response data. So we could connect data, but we won't. Of course respondents need to trust us. But that would be same with the "non-anonymous anonymous" mode that you would like to use. People would need to trust you to not pass on personal data to the survey data and store it there.
My opinion: If Limesurvey offers an anonymous mode, there should be no way for users to transfer data from the token table to the survey, as people will expect a technical anonymity (no out of the box ways to circumvent the anonymity mode easily). There are always ways that can be found to go around those things somehow, but why would we do this?
Just tell it how it is: You need certain variables of their profile for the survey to work and for asking the right questions. But you guarantee that you won't connect their survey responses with their person. Ethical anonymity. They will need to trust you anyway.