First, these are all fire attacks and rock attacks.
/ms7 fire type,physical|special (34 results)
Blast Burn, Blaze Kick, Blue Flare, Burn Up, Ember, Eruption, Fiery Dance, Fire Blast, Fire Fang, Fire Lash, Fire Pledge, Fire Punch, Fire Spin, Flame Burst, Flame Charge, Flame Wheel, Flamethrower, Flare Blitz, Fusion Flare, Heat Crash, Heat Wave, Hidden Power Fire, Incinerate, Inferno, Inferno Overdrive, Lava Plume, Magma Storm, Mind Blown, Mystical Fire, Overheat, Sacred Fire, Searing Shot, Shell Trap, V-create
/ms7 rock type,physical|special:
Accelerock, Ancient Power, Continental Crush, Diamond Storm, Head Smash, Hidden Power Rock, Power Gem, Rock Blast, Rock Slide, Rock Throw, Rock Tomb, Rock Wrecker, Rollout, Smack Down, Splintered Stormshards, Stone Edge
I ignored hidden power and the Z-moves.
The 3 most common fire moves are flamethrower, fire blast, and overheat, and the 3 most common rock moves are rock slide, rock tomb, and stone edge. I ignored blast burn, blue flare, burn up, ember, eruption, fiery dance, fire lash, fire pledge, fire spin, flame burst, flare blitz, heat crash, lava plume, magma storm, mind blown, sacred fire, searing shot, shell trap, V-create, accelerock, diamond storm, rock throw, and rock wrecker, because every Pokemon that learns any of these moves also learns one of the 3 most common moves of its type. For example, every Pokemon that learns fire spin also learns flamethrower, so if I'm already searching for flamethrower, I don't need to also search for fire spin. After taking out those moves, here are the remaining moves.
Blaze kick, fire blast, fire fang, fire punch, flame charge, flame wheel, flamethrower, fusion flare, heat wave, incinerate, inferno, mystical fire, overheat
Ancient power, head smash, power gem, rock blast, rock slide, rock tomb, rollout, smack down, stone edge
Of these moves, blaze kick, flame charge, flame wheel, fusion flare, inferno, mystical fire, head smash, and rock blast are "rare" moves, meaning that very few Pokemon learn one of these moves and none of the 3 most common attacks of its type. Of course, the question asks for Pokemon that also learn an attack of the opposite type, so I searched for those Pokemon. I believe this is a full list of them.
Deino, Hitmonlee, Kyurem-white, Lucario, Misdreavus, Mismagius, Octillery, Pikipek, Remoraid, Riolu, Trumbeak, Toucannon, Type: Null, Zweilous
The remaining moves are very common, and none of them are subsets of each other.
Fire blast, fire fang, fire punch, flamethrower, heat wave, incinerate, overheat
Ancient power, power gem, rock slide, rock tomb, rollout, smack down, stone edge
Thus, I searched for Pokemon that learn any of these fire moves and any of these rock moves.
/ds7 fire blast|fire fang|fire punch,ancient power|power gem|rock slide (160 results)
Absol, Aerodactyl, Aggron, Ampharos, Arbok, Arceus, Bagon, Bastiodon, Blaziken, Blissey, Camerupt, Celesteela, Chansey, Charizard, Charmander, Charmeleon, Combusken, Conkeldurr, Cranidos, Cubone, Darmanitan, Darumaka, Deoxys, Dialga, Diggersby, Donphan, Dragonite, Drampa, Drapion, Druddigon, Dunsparce, Dusclops, Dusknoir, Eelektross, Electivire, Emboar, Exploud, Flaaffy, Flygon, Gabite, Gallade, Garchomp, Geodude, Geodude-Alola, Gible, Gliscor, Golem, Golem-Alola, Golett, Golurk, Goodra, Gourgeist, Granbull, Graveler, Graveler-Alola, Grimer, Grimer-Alola, Groudon, Grumpig, Gurdurr, Guzzlord, Hariyama, Hawlucha, Heatran, Heliolisk, Hippowdon, Hitmonchan, Ho-Oh, Hydreigon, Infernape, Jirachi, Kangaskhan, Kecleon, Kommo-o, Krokorok, Krookodile, Lickilicky, Lickitung, Loudred, Lycanroc, Machamp, Machoke, Machop, Magcargo, Magmortar, Makuhita, Mankey, Marowak, Marowak-Alola, Marshadow, Mawile, Medicham, Meditite, Mew, Mewtwo, Miltank, Moltres, Monferno, Muk, Muk-Alola, Munchlax, Nidoking, Nidoqueen, Nosepass, Numel, Palkia, Pancham, Pangoro, Pignite, Primeape, Probopass, Pumpkaboo, Rampardos, Rayquaza, Regigigas, Regirock, Reshiram, Reuniclus, Rhydon, Rhyhorn, Rhyperior, Rockruff, Sableye, Salamence, Sandile, Sawk, Scrafty, Scraggy, Shelgon, Shieldon, Silvally, Simisear, Slaking, Slakoth, Slowking, Slugma, Smeargle, Snorlax, Solgaleo, Solrock, Spinda, Steelix, Sudowoodo, Tauros, Teddiursa, Throh, Timburr, Togekiss, Togepi, Togetic, Torchic, Torkoal, Typhlosion, Tyranitar, Tyrantrum, Tyrunt, Ursaring, Vigoroth, Volcanion, Zangoose
/ds7 fire blast|fire fang|fire punch,rock tomb|rollout|smack down (177 results)
Absol, Aerodactyl, Aggron, Arbok, Arceus, Bagon, Bastiodon, Blacephalon, Blaziken, Blissey, Camerupt, Celesteela, Chansey, Charizard, Charmander, Charmeleon, Chimchar, Clefable, Clefairy, Cleffa, Combusken, Conkeldurr, Cranidos, Cubone, Cyndaquil, Darmanitan, Darumaka, Deoxys, Dialga, Diggersby, Donphan, Dragonite, Drapion, Druddigon, Dunsparce, Dusclops, Dusknoir, Eelektross, Electivire, Emboar, Exploud, Flygon, Furret, Gabite, Gallade, Garchomp, Geodude, Geodude-Alola, Gible, Gliscor, Golem, Golem-Alola, Golett, Golurk, Granbull, Graveler, Graveler-Alola, Grimer, Grimer-Alola, Groudon, Gulpin, Gumshoos, Gurdurr, Guzzlord, Happiny, Hariyama, Hawlucha, Heatmor, Heatran, Heliolisk, Herdier, Hippowdon, Hitmonchan, Hydreigon, Igglybuff, Infernape, Jigglypuff, Kangaskhan, Kecleon, Koffing, Kommo-o, Krokorok, Krookodile, Lickilicky, Lickitung, Lillipup, Loudred, Lycanroc, Machamp, Machoke, Machop, Magcargo, Magmortar, Makuhita, Mankey, Marowak, Marowak-Alola, Marshadow, Mawile, Medicham, Meditite, Mew, Mewtwo, Miltank, Monferno, Muk, Muk-Alola, Munchlax, Nidoking, Nidoqueen, Nosepass, Numel, Octillery, Palkia, Pancham, Pangoro, Pansear, Pignite, Primeape, Probopass, Quilava, Rampardos, Rayquaza, Regigigas, Regirock, Remoraid, Reshiram, Reuniclus, Rhydon, Rhyhorn, Rhyperior, Rockruff, Sableye, Salamence, Sandile, Sawk, Scrafty, Scraggy, Sentret, Shelgon, Shieldon, Simisear, Slaking, Slakoth, Slugma, Smeargle, Snorlax, Solgaleo, Solrock, Spinda, Steelix, Stoutland, Sudowoodo, Swalot, Tauros, Teddiursa, Tepig, Throh, Timburr, Togekiss, Togepi, Togetic, Torchic, Torkoal, Turtonator, Typhlosion, Tyranitar, Tyrantrum, Tyrunt, Ursaring, Vigoroth, Volcanion, Weezing, Whismur, Wigglytuff, Yungoos, Zangoose
/ds7 fire blast|fire fang|fire punch,stone edge (95 results)
Absol, Aerodactyl, Aggron, Arceus, Bastiodon, Blaziken, Camerupt, Celesteela, Conkeldurr, Cranidos, Darmanitan, Dialga, Diggersby, Donphan, Dragonite, Emboar, Entei, Flygon, Gabite, Gallade, Garchomp, Geodude, Geodude-Alola, Gible, Gliscor, Golem, Golem-Alola, Golurk, Granbull, Graveler, Graveler-Alola, Grimer-Alola, Groudon, Gurdurr, Guzzlord, Gyarados, Hariyama, Hawlucha, Heatran, Hippowdon, Hitmonchan, Hydreigon, Infernape, Krokorok, Krookodile, Lycanroc, Machamp, Magcargo, Marowak, Marowak-Alola, Marshadow, Mawile, Meloetta, Mew, Mewtwo, Muk-Alola, Nidoking, Nidoqueen, Nosepass, Palkia, Pancham, Pangoro, Pignite, Primeape, Probopass, Rampardos, Rayquaza, Regigigas, Regirock, Reshiram, Rhydon, Rhyhorn, Rhyperior, Rockruff, Salamence, Sandile, Sawk, Scrafty, Scraggy, Shieldon, Smeargle, Solgaleo, Solrock, Steelix, Sudowoodo, Tauros, Throh, Timburr, Torkoal, Turtonator, Tyranitar, Tyrantrum, Tyrunt, Ursaring, Volcanion
/ds7 flamethrower|heat wave|incinerate,ancient power|power gem|rock slide (126 results)
Absol, Aerodactyl, Aggron, Arceus, Archen, Archeops, Bagon, Bastiodon, Blaziken, Blissey, Braviary, Camerupt, Celesteela, Chansey, Charizard, Charmander, Charmeleon, Combusken, Cranidos, Cubone, Darkrai, Darmanitan, Darumaka, Dialga, Dragonite, Drampa, Druddigon, Dunsparce, Eelektross, Electivire, Emboar, Exeggutor-Alola, Exploud, Flygon, Gabite, Garchomp, Geodude, Geodude-Alola, Gible, Golem, Golem-Alola, Goodra, Gourgeist, Granbull, Graveler, Graveler-Alola, Grimer, Grimer-Alola, Groudon, Guzzlord, Haxorus, Heatran, Ho-Oh, Hydreigon, Infernape, Inkay, Kangaskhan, Kecleon, Kommo-o, Krokorok, Krookodile, Lickilicky, Lickitung, Loudred, Machamp, Machoke, Machop, Magcargo, Magmortar, Malamar, Marowak, Marowak-Alola, Mawile, Mew, Mewtwo, Moltres, Monferno, Muk, Muk-Alola, Munchlax, Necrozma, Nidoking, Nidoqueen, Numel, Palkia, Pignite, Pumpkaboo, Rampardos, Rayquaza, Reshiram, Rhydon, Rhyhorn, Rhyperior, Rufflet, Sableye, Salamence, Sandile, Scrafty, Scraggy, Shelgon, Shieldon, Sigilyph, Silvally, Simisear, Slaking, Slakoth, Slowking, Slugma, Smeargle, Snorlax, Solgaleo, Solrock, Tauros, Togekiss, Togepi, Togetic, Torchic, Torkoal, Typhlosion, Tyranitar, Vibrava, Vigoroth, Volcanion, Yveltal, Zangoose, Zapdos
/ds7 flamethrower|heat wave|incinerate,rock tomb|rollout|smack down (145 results)
Absol, Aerodactyl, Aggron, Arceus, Archen, Archeops, Axew, Bagon, Bastiodon, Blacephalon, Blaziken, Blissey, Braviary, Camerupt, Celesteela, Chansey, Charizard, Charmander, Charmeleon, Chimchar, Clefable, Clefairy, Cleffa, Combusken, Cranidos, Cubone, Cyndaquil, Darkrai, Darmanitan, Darumaka, Dialga, Dragonite, Druddigon, Dunsparce, Eelektross, Electivire, Emboar, Exeggutor-Alola, Exploud, Flygon, Fraxure, Furret, Gabite, Garchomp, Geodude, Geodude-Alola, Gible, Golem, Golem-Alola, Granbull, Graveler, Graveler-Alola, Grimer, Grimer-Alola, Groudon, Guzzlord, Happiny, Haxorus, Heatmor, Heatran, Hydreigon, Igglybuff, Infernape, Jigglypuff, Kangaskhan, Kecleon, Koffing, Kommo-o, Krokorok, Krookodile, Lickilicky, Lickitung, Loudred, Machamp, Machoke, Machop, Magcargo, Magmortar, Mandibuzz, Marowak, Marowak-Alola, Mawile, Mew, Mewtwo, Monferno, Muk, Muk-Alola, Munchlax, Necrozma, Nidoking, Nidoqueen, Numel, Octillery, Palkia, Pansear, Pignite, Pikipek, Quilava, Rampardos, Rayquaza, Remoraid, Reshiram, Rhydon, Rhyhorn, Rhyperior, Rufflet, Sableye, Salamence, Sandile, Scrafty, Scraggy, Sentret, Shelgon, Shieldon, Sigilyph, Simisear, Slaking, Slakoth, Slugma, Smeargle, Snorlax, Solgaleo, Solrock, Tauros, Tepig, Thundurus, Togekiss, Togepi, Togetic, Torchic, Torkoal, Tornadus, Toucannon, Trumbeak, Turtonator, Typhlosion, Tyranitar, Vibrava, Vigoroth, Volcanion, Vullaby, Weezing, Whismur, Wigglytuff, Zangoose
/ds7 flamethrower|heat wave|incinerate,stone edge (68 results)
Absol, Aerodactyl, Aggron, Arceus, Archen, Archeops, Bastiodon, Blaziken, Camerupt, Celesteela, Cranidos, Darmanitan, Dialga, Dragonite, Emboar, Entei, Flygon, Gabite, Garchomp, Geodude, Geodude-Alola, Gible, Golem, Golem-Alola, Granbull, Graveler, Graveler-Alola, Grimer-Alola, Groudon, Guzzlord, Gyarados, Heatran, Hydreigon, Infernape, Krokorok, Krookodile, Machamp, Magcargo, Marowak, Marowak-Alola, Mawile, Mew, Mewtwo, Muk-Alola, Necrozma, Nidoking, Nidoqueen, Palkia, Pignite, Rampardos, Rayquaza, Reshiram, Rhydon, Rhyhorn, Rhyperior, Salamence, Sandile, Scrafty, Scraggy, Shieldon, Smeargle, Solgaleo, Solrock, Tauros, Torkoal, Turtonator, Tyranitar, Volcanion
/ds7 overheat,ancient power|power gem|rock slide (37 results)
Arceus, Blaziken, Camerupt, Charizard, Charmander, Charmeleon, Combusken, Darmanitan, Darumaka, Dialga, Emboar, Exploud, Granbull, Groudon, Heatran, Ho-Oh, Infernape, Loudred, Magcargo, Magmortar, Mankey, Mew, Moltres, Monferno, Numel, Pignite, Primeape, Rayquaza, Reshiram, Simisear, Slugma, Smeargle, Solrock, Torchic, Torkoal, Typhlosion, Volcanion
/ds7 overheat,rock tomb|rollout|smack down (44 results)
Arceus, Blacephalon, Blaziken, Camerupt, Charizard, Charmander, Charmeleon, Chimchar, Combusken, Cyndaquil, Darmanitan, Darumaka, Dialga, Emboar, Exploud, Granbull, Groudon, Heatmor, Heatran, Infernape, Loudred, Magcargo, Magmortar, Mankey, Mew, Monferno, Numel, Pansear, Pignite, Primeape, Quilava, Rayquaza, Reshiram, Simisear, Slugma, Smeargle, Solrock, Tepig, Torchic, Torkoal, Toucannon, Turtonator, Typhlosion, Volcanion
/ds7 overheat,stone edge:
Arceus, Blaziken, Camerupt, Darmanitan, Dialga, Emboar, Entei, Granbull, Groudon, Heatran, Infernape, Magcargo, Mew, Pignite, Primeape, Rayquaza, Reshiram, Smeargle, Solrock, Torkoal, Turtonator, Volcanion
Filtering out the Pokemon that aren't obtainable in Sun is left as an exercise for the reader.