There does not appear to be a hard canon answer
The general plan for Dark Sun as a setting was "you're either here or there, not both." Athas is intended to be remote and inaccessible, and on the rare occasions where some form of portal existed allowing departure from the Crimson Sphere, that was... sort of the point. Leave and don't come back - who would want to?
Dark Sun books tell us spelljammers simply cannot enter the crystal sphere, at least not via spelljamming. They also tell us it's surpassingly hard to use normal transitive methods - effectively impossible through the Astral and very, very unlikely through the Ethereal. So the message is pretty clear - outsiders out, insiders in, no need to address the question because it'll never happen, right?
Wrong. Let's pop into the super-adventure Black Spine and discover that, why yes indeed, outsiders can enter Athas. The githyanki did, in fact - that's where the degenerate gith of Athas originated, thousands of years ago. The conceit of the adventure is that the githyanki have come back, and they're planning a full-scale invasion once they can stabilize a portal.
The fact that some of the githyanki can use magic, and do within the context of the adventure, gives us an unambiguous answer to the question of whether foreign casters can use magic while on Athas.
...but doesn't answer exactly how that works, or what the limitations might be. It could be that the githyanki general encountered at the Nightmare Gate is using its flickering Astral Plane connection to source his magic energies from another plane, and wouldn't be able to pull off such casting elsewhere or if it was closed.
What we know from official Dark Sun material are the following points:
- Arcane magic has to be sourced, and the primary source on Athas is life energy.
- Other valid sources are other planes, the Sun (only one wizard is noted to do this), and (in the most recent development) the Cerulean Storm, which is basically an elaborate blend of these when you get right down to it.
- The githyanki were able to use magic while on Athas, both in the distant past and more recently.
- Some of the applications that the githyanki put their magic to were to grow and sustain large and thriving biomes of plant life (for food supply in their underground fortress). This essentially tells us that the githyanki were not casting in the defiler manner, as the spells would have vaporized the life they were trying to generate.
- Statistically, the default wizard of other worlds is cognate to a preserver, not to a defiler.
So what's the answer, in the end?
As noted above, the fact that the githyanki were operating with an active portal leaves a literal backdoor open to saying that they were never limited to Athasian sources of arcane energy. My personal takeaway would be this:
- Traditional arcane magic from other worlds is cognate to preserver magic, which was what Rajaat originally discovered before pushing the boundaries. An Athasian preserver could easily cast spells on other worlds and would likely be shocked to find herself not limited by the fecundity of the nearby terrain and the ready availability of arcane energy. Conversely, while a foreign mage can also cast on Athas, they would encounter unexpected limitations:
- The arcane energies of Athas are bound up in life force and are more complex to tap into. In 3rd Edition, for instance, this would require a Spellcraft check to be able to cast a spell - and the more powerful the spell, the more challenging the check.
- Spells tapping the elements are no less irksome to the elemental forces that watch over Athas when cast by a visitor than when cast by a native. The penalties associated with wielding elemental magic apply equally.
- Spells that create water in any form or manipulate life/positive energy are likely impeded, functioning with reduced efficiency and/or requiring a caster level check to make work.
- Metamagic may not function properly without accidentally defiling, unless the caster learns the local methods of preservers for using metamagic.
- Spellcasting may be less efficient without practice drawing on life energy. A spell may take a full round to cast rather than a single action. The caster may attempt to push this but might accidentally defile in doing so. After a short period of learning how to tap arcane energy locally (few days to a week), the average caster should be able to pass a Wisdom check and thenceforth be able to operate in the same fashion as a preserver does.
That's what I've got for you. Hope it helps!