Only guidelines exist
A construct with an Intelligence score of at least 3 can take class levels. In fact, any creature with an Intelligence score of at least 3 can potentially take class levels (MM 7). Many don't, advancing instead by Hit Dice, but they can. Even creatures with Strength and Dexterity as nonabilities (MM 312) can take class levels, although many class features won't be particularly useful if the creature can't exert physical force because it lacks a Strength score and can't move because it lacks a Dexterity score.
That latter problem, by the way, may entirely prohibit casting spells (although not manifesting psionic powers) or even speaking generally. The Monster Manual says, "A creature with no Dexterity score can’t move" (312), so ask the DM if that means the creature can't take move actions, can't leave its space under its own power, is essentially and forevermore paralyzed, or something else.
If the construct's house ruled special ability self-propulsion functions like a psi-crystal's self-propulsion, when the special ability's active the creature will gain a Strength score of 1 and a Dexterity score of 15 if a Diminutive creature. I suggest modifying those ability scores according to the construct's size category (MM 291). For example, a typical lance, were the DM to rule that it's Medium size, when using the special ability self-propulsion would have an adjusted Strength score of 11 and Dexterity score of 9.
Some conservative house rules
Were such a creature an important figure in my campaign, I'd start with the statistics for an appropriately sized animated object (MM 13–14), but make Strength and Dexterity nonabilities. This jibes with the very rough guidelines for Intelligent Items from the Dungeon Master's Guide: "Intelligent items can actually be considered creatures because they have Intelligence, Wisdom, and Charisma scores. Treat them as constructs" (268–71). From there, the creature takes class levels, and has as its race animated object.
There are a few additional issues to consider when introducing intelligent magic items and intelligent animated objects to a campaign.
According to Wizards of the Coast
Below are the different ways intelligent created creatures are discussed in Dungeons and Dragons 3.5 by the game's publishers.
Intelligent magic items should be inexpensive
According to pages 268–9 of the Dungeon Master's Guide "permanent magic items… can be intelligent" for a pittance (e.g. an item with Int 12, Wis 10, Cha 10 that communicates via empathy and has 30 ft. vision and hearing costs adds only 1,000 gp to an item's base price (or 2,000 gp if the DM insists it have at least the 1 lesser power bless 3/day)). Spending 500 to 1,000 gp and 20-40 XP lets any permanent magic item's creator grant the magic item sentience.
This is an incredibly small price to pay for an AI, and apparently any level 15 caster with the feat Craft Magic Arms and Armor (PH 92), Craft Rod (PH 92), Craft Wondrous Item (PH 92-3), Forge Ring (PH 94), or other item creation feat that allows the creation of permanent magic items can do this without issue. No spells required. That's weird.
Intelligent magic items should not be considered truly intelligent
Other than the Dungeon Master's Guide's vague indication that anybody powerful enough and possessing the correct feats can create intelligent magic items, the only other canonical mention of the nuts and bolts of doing so appears to be the 6th-level Sor/Wiz spell Nybor's psychic imprint [trans] (Magic Books of Faerun column "Nybor's Small Codex: Spells from a Former Zulkir"). To summarize, the spell copies the target's brain patterns (or whatever) (a la Marvel Comics's Wonder Man and the Vision) and uses those as the basis of the intelligent item's personality. Gaining experience isn't possible for an intelligent item; the item has the target creature's personality and experience at that precise moment, unchanging, frozen forever.
(Philosophically, I really don't know if that's better or worse than dirt cheap AIs. The game thinks the spell is evil, though—y'know, just like the 1st-level Clr spell deathwatch [necro] (PH 217).)
Note: Although never stated directly, I think the spell Nybor's psychic imprint was an effort to explain why intelligent magic items—which are otherwise pretty smart for constructs—don't have Hit Dice, feats, skills, and other traits and features consistent with real creatures. In Dungeons and Dragons, 3rd Edition constructs, even if they possesses an Intelligence score of 3 or higher, just couldn't have feats or skills. This changed with the 3.5 revision… while the intelligent item rules didn't.
Intelligent animated objects should be extremely expensive
The Monster Manual says that animated objects "owe their existence as creatures to spells such as animate objects or similar supernatural abilities" (13), and, indeed, the Player's Handbook permits a 14th-level caster to use the 5th-level Sor/Wiz spell permanency [univ] (PH 259-60) on the 5th-level urban druid (Dragon Compendium Volume I 57–65) spell animate objects [trans] (PH 199) by spending 3,000 XP.
That means a buyer who wants an animated candelabra to do his bidding pays 450 gp for an urban druid 9 to cast the spell animate objects and 22,000 gp for a Wiz14 to cast the spell permanency on the spell animate objects.1 The animated objects then uses the statistics from the Monster Manual (13–14).
Except such a creature has Intelligence as a nonability (MM 312). To give it an Intelligence score, the buyer pays 26,530 gp to a Wiz17 to cast the 9th-level Sor/Wiz spell awaken construct [trans] (Spell Compendium 21). That's nearly 50,000 gp for but a single (and, O, so single!) singing, dancing candlestick.
As 22,000 gp buys a nimblewright (Monster Manual II 162–3), Lumière's probably a bit overpriced.2
…And that's pretty much it
A DM should probably consider all three factors when making intelligent animated objects or magic items an important part of his campaign.3
The third-party alternative
White Wolf's Sword and Sorcery Studios's Malhavoc Press imprint originally published rules allowing intelligent magic items to gain class levels in Book of Eldritch Might III: The Nexus (2003) for Dungeons and Dragons, 3rd Edition and updated those rules to Dungeons and Dragons 3.5 in the Complete Book of Eldritch Might (2004).
Although I hesitate to suggest a third-party publisher for your needs—especially while I'm certain other third-party publishers have also made available such rules—, Monte Cook, who authored both Books, is credited with writing the Dungeon Master's Guide for Dungeons and Dragons, 3rd Edition so his résumé's pretty good. Further, his third-party material is generally high quality (but, if I may say so, fairly conservative).
In short, the system presented therein has intelligent items gain levels in the class Intelligent Item—a 20-level base class exclusive to intelligent items that grants the item class features like skill points, saving throw bonuses, bonus feat, and spell-like abilities—upon the creator or wielder spending XP equal to 1/4 the amount needed to advance a normal creature (the creator or wielder can't, however, spend XP to advance an item with an Intelligent Item class level greater than the wielder's own). The intelligent items section occupies pages 45–57 of Nexus and 62–71 of Complete; a cursory glance leads me to believe no changes were made by the compilation.
1 According to Spellcasting and Services on Table 7-8: Goods and Services, because of the high cost, a wizard who'll cast the spell permanency on the spell animate objects or who'll cast the spell awaken construct "is not generally available except by the DM's permission" (PH 129). Further, the spell permanency includes the spell animate objects in the list of "spells [that] can be cast upon objects [n.b. plural] or areas only and rendered permanent" (260), so a generous DM could allow a single casting of the spell permanency to affect all the objects animated by a single casting of the spell animate objects. Given their commonality in fiction, I probably would. Finally, while the material component for the spell awaken construct is violently unusual, but no price is listed for it and there's no M in its short description, so it's in every spell component pouch; make of that what you will.
2 I know that technically the Enchantress probably used an epic spell with the transform seed, but, seriously, what were you thinking of when I brought up animated objects?
3 I have reached the conclusion, however, that every campaign should include a cudgel that never forgets (Magic Item Compendium 49) (20,312 gp; 8 lbs.). I didn't want my favorite intelligent magic item to go unmentioned… for obvious reasons.