Macro conditionals only work with macro commands. "/w" and "/run" aren't macro commands, so you can't use macro conditionals with them.
Code:
/run SendChatMessage(IsMouseButtonDown("RightButton") and "retract" or "bid", "WHISPER", nil, "Lootmaster")
This will probably also only work if you have actions trigger on mousedown instead of mouseup in your Interface Options, since otherwise the mouse button is no longer down when the command is executed. Using a modifier key (eg. Shift) would probably work better:
Code:
/run SendChatMessage(IsShiftKeyDown() and "retract" or "bid", "WHISPER", nil, "Lootmaster")