Question 1: Is there a list of which role each Pokémon fills?
My recommended source is the Attacking tier list and Defending tier list from Gamepress, with another list to cover good defending Pokemon based on their goal. They contain a list of Pokemon ideal for attacking and defending respectively, including stating their roles. Most Pokemon are excluded from these lists, as most Pokemon are outclassed in attacking or defending compared to other Pokemon.
Question 2: is there a way to identify what their preferred role is from their IVs?
Generally speaking IVs don't change a Pokemon's role, but rather make them better or worse at their designated role (which can be determined from those above lists). Technically speaking, more IVs makes them better at said role.
Whilst all IVs help for both attacking and defending, Attack IVs are generally more important for attacking to increase DPS (Damage Per Second) than Def and Stamina. IVs aren't really going to change much in attacking though compared to the Pokemon's typing, movepool and base stats e.g. a 0 Atk IVs is not going to change your role from attacking to defending compared to 15 Atk IVs, but it will make you worse at attacking, potentially to the point where it's not worth using said Pokemon in attacking.
Defending is more tricky. For defending, really the main goal is to deter people from attacking as that's the best defence (I assume a person attacking a gym will beat it - your IVs may make your Pokemon do better in the battles but they'll all end with it losing). In that sense, CP matters more than IVs there since people only see CP and hence CP and not IVs will deter people from attacking. In that sense, Attack is more important too since it has a stronger influence on stats. But higher CP means faster motivation decay, so a lower CP Pokemon i.e. one with lower IVs may potentially be more useful if you want the Pokemon to have higher motivation over a longer time period. So a lower IV Pokemon may be more helpful for maintaining motivation over a longer-time period, whilst a higher IV over a shorter time period. Levelling would have just as much influence as IVs in that regards by influencing CP.