Got it. I just modified the code for naming enchanted weapons slightly to change the text in the input box. Otherwise it appears to work for creatures just as well as weapons. I suspect you could rename anything if you coded it properly.
Here's the code I used:
//renames golem.
//#include "ginc_crafting"
void SetEnchantedItemName(object oPC, object oItem)
{
string VAR_ENCHANTED_ITEM_OBJECT = "EnchantedItemObject";
int nMessageStrRef = 181743;
string sMessage = "What shall you name the golem?"; // "Please rename the item.";
string sOkCB = "gui_name_enchanted_item";
string sCancelCB = "";
int bShowCancel = FALSE;
string sScreenName = "";
int nOkStrRef = 181744;
string sOkString = "";
int nCancelStrRef = 181745;
string sCancelString = "";
string sDefaultString = GetFirstName(oItem);
string sVariableString = "";
// the gui script will always run on the owned PC, regardless of who the player has possessed.
object oObj = GetOwnedCharacter(oPC);
SetLocalObject(oObj, VAR_ENCHANTED_ITEM_OBJECT, oItem);
DisplayInputBox( oPC, nMessageStrRef, sMessage, sOkCB, sCancelCB, bShowCancel,
sScreenName, nOkStrRef, sOkString, nCancelStrRef, sCancelString,
sDefaultString, sVariableString);
}
void main()
{
object oGolem = GetObjectByTag("golem_companion");
object oPC = GetFactionLeader(GetFirstPC());
SetEnchantedItemName(oPC,oGolem);
}