If you take something like the "dagger of denial", which will work against a player if their goals are not aligned, can you remove the sentience, by the 3.5 rules and extended rules, to make it a dagger that counters/dispels and does the things by order, much like a golem would if it were given a command?
The easy way: The greater humanoid essence spell
The Dungeon Master's Guide on Intelligent Items says, "Intelligent items can actually be considered creatures because they have Intelligence, Wisdom, and Charisma scores. Treat them as constructs…" (268). However, it's difficult to consider an intelligent magic item a creature because an intelligent magic item lacks Hit Dice. Nonetheless, if the DM permits an intelligent magic item to be treated exactly like a creature that possesses the type construct, then an intelligent magic item can be the subject of the 7th-level Clr spell greater humanoid essence [trans] (Races of Eberron 186–7) that, in addition to other effects, changes a creature's type from construct to humanoid and specifically removes the subject's immunity to mind-affecting effects.
If successful, the essence spell should leave the intelligent magic item vulnerable to spells like the 1st-level Sor/Wiz spell charm person [ench] (Players Handbook 209), the 5th-level Sor/Wiz spell dominate person [ench] (PH 224–5), and—if long-term behavioral modification of the intelligent magic item is desired—the 9th-level Sor/Wiz spells mindrape [ench] (Book of Vile Darkness 99) and programmed amnesia [ench] (Spell Compendium 162–3). (A spell normally only checks if a subject is a valid target when the spell comes into effect, so there's usually no risk of the follow-up spell ending when the essence spell's duration expires; so even though the intelligent magic item is no longer a valid target for the follow-up spell when the essence spell expires, it was when when the follow-up spell was cast, and that's usually all that matters.)
(I am likewise fond of this fine answer's recommendation of casting upon a temporarily-humanoid intelligent magic item the 5th-level Sor/Wiz spell feeblemind [ench] (PH 229–30), mainly because then the wielder can use the skill Handle Animal to teach the weapon tricks: "You can use this skill [Handle Animal] on a creature with an Intelligence score of 1 or 2 that is not an animal, but the DC of any such check increases by 5" (PH 75), and the DM has already ruled that the intelligent magic item is a creature!)
The expensive way: Make your own
If the DM says that the essence spell is not an option—a perfectly reasonable ruling given the gray area in which intelligent items exist—, and the DM allows PCs to create original magic items, then a craftsman can employ the feat Craft Magic Arms and Armor (PH 92) to create a weapon that's identical to a dagger of denial (Magic Item Compendium 50) (20,302; 1 lb.) except that the weapon's imbued with a personality more to the creator's liking. (The Dungeon Master's Guide on Intelligent Item Creation says that the only prerequisite for creating an intelligent magic item is caster level 15th and that an intelligent magic item's alignment is the same as its creator's.)
A creator that wants to make his own nonrelic dagger of denial that's a +1 unholy dagger that possesses intelligent magic item statistics (including skill ranks) on par with the dagger of denial that can also use at will an effect like the spell detect magic and use 1/day an effect like the spell greater dispel magic, spends 18,302 gp for the dagger; 12,000 gp for the statistics; 15,000 gp for the skills; 3,600 gp for the detect magic ability; and 23,760 gp for the greater dispel magic ability (extrapolated from the Arms and Equipment Guide's Table 6–3: Extraordinary Powers and Market Price Modifiers entry for an intelligent magic item's ability to use 1/day a globe of invulnerability effect, that spell being the same spell level as the greater dispel magic spell).
This works out to an almost unfathomable 72,662 gp for a a nonrelic probably-automatically-obedient dagger of denial. (Some folks would argue that if you want a dagger of denial that badly it's better to change your alignment to be compatible with a regular dagger of denial's alignment than to pay that much for a dagger of denial that's compatible with your alignment!)
"No way!": The Use Magic Device skill
An extraordinarily problematic example from the Player's Handbook on the Use Magic Device skill on Emulate a Class Feature says
Lidda finds a magic chalice that turns regular water into holy water when a cleric or an experienced paladin channels positive energy into it as if turning undead. She attempts to activate the item by emulating the cleric’s undead turning ability. Her effective cleric level is her check result minus 20. Since a cleric can turn undead at 1st level, she needs a Use Magic Device check result of 21 or higher to succeed. (86)
(The SRD omits this example as it does most examples.) The skill use's description continues, saying, "This skill does not let you actually use the class feature of another class. It just lets you activate items as if you had that class feature."
Thus a creature that can succeed once per hour on a Use Magic Device skill check to emulate an alignment of N, LE, NE, or CE (DC 30) and succeeds once per day on a Use Magic Device skill check to emulate the class feature spellcasting of a level 11 cleric (DC 31) so as to expend a 6th-level spell slot the creature doesn't possess should be able to convince the dagger of denial that the creature is a legitimate and worthy wielder of it and be able to boss it around without fear of betrayal.
However, employing the Use Magic Device skill in this way is controversial; ask the DM first before assuming this will work.
Note: More information about intelligent magic items—including more detailed information about how they can be manufactured by PCs and the short shrift they receive from the 3.5 rules—can be found in answers to this question and this question.
The intelligent item rules include this:
Intelligent items can actually be considered creatures because they have Intelligence, Wisdom, and Charisma scores. Treat them as constructs. Intelligent items often have the ability to illuminate their surroundings at will (as magic weapons do); many cannot see otherwise.
So anything that could allow you to control a construct or strip it of its abilities would work. For example, if you have the warforged domain, you can rebuke constructs: that could be used to order the item around.
Greater humanoid essence, a 6th-level artificer infusion or 7th-level cleric spell from Races of Eberron, strips a construct of the Construct type, and with it, its immunity to mind-affecting spells. At that point you could use feeblemind on it. That still leaves it with Intelligence and Charisma 1, but its ego will be very weak at that point and you won’t have a lot to worry about from it. And since the magic is instantaneous, no need to worry about what happens when humanoid essence wears off.
If you can find a 13th-level cleric (or 14th-level artificer) for hire and a 11th-level sorcerer or wizard for hire, you could have those two spells cast for you for 910 gp (or 980 gp for the artificer) and 550 gp, respectively.