All of the following is based on my assumption that nothing relevant has changed from how it worked in Fallout 3 (please let me know if something has)...
If you want to use http://geck.gamesas.com/index.php/AddItem to add an item to a reference to a scripted object from within that object's script, you don't need to use http://geck.gamesas.com/index.php/GetSelf. The following two segments of code will do the same thing, except the script that uses http://geck.gamesas.com/index.php/GetSelf will be slightly slower and will not work if the placed reference is saved in the savegame, like one that was placed via http://geck.gamesas.com/index.php/PlaceAtMe:
ref rSelf;...set rSelf to GetSelfrSelf.AddItem ExampleItem 1
AddItem ExampleItem 1
To answer the question you asked in the title, http://geck.gamesas.com/index.php/GetSelf will return the container's refID, except in the case that it is saved in the save file (i.e. starts with 0xFF, and as opposed to being saved in a data file) where it will instead return 0. http://geck.gamesas.com/index.php/GetSelf is only useful when that information is passed to an external script, or it is needed for a function parameter, such as with http://geck.gamesas.com/index.php/PushActorAway.
Cipscis