I am studying in Oslo right now and I have a valid student ID and semester card. Am I eligible to get a student discount when buying the public transport card in Stockholm or is it only applicable for the local students?
Unfortunately, you won't be able to get such discounts.
Only students in Swedish universities or other eligible educational institutes can obtain such cards, and those are period cards for 30 or 90 days.
If you are staying only for a short time in Stockholm(which is not immediately apparent from your question), you may take advantage of the visitor tickets which are available for 24-hour, 72-hour or 7-day periods. The prices are quite competitive (the 24 hour ticket is approximately equal in value for 3-4 journeys), and this is type of ticket I usually get when I visit. You can also take advantage of the reduced price for many tickets, provided you are below 20 years of age. Some sort of national ID or a passport would be needed, but I assume Norwegian documents can be accepted without batting an eyelid.
You might also want to purchase an SL-card (additional price 20 SEK), which makes access to public transport much easier, more so if you plan to visit Stockholm again in the future. You can purchase these cards from almost anywhere in Stockholm (Pressbyrån shops on the airport and in the city, for example, but by no means only there). There are vending machines in everywhere in the Metro system and at central locations, and those are usually your best bet, though I'm not 100% sure if you can get a card from them directly, or if you only use them to top up.