As tempting as it is to attack these enemies while they're fighting allies, if you're not already decloaked and near them, they'll likely finish off your allies (or die), then turn around to make sure enemies aren't sneaking up behind them.
Footsteps can be somewhat of a giveaway, but since all players allies and enemies alike make footsteps, they alone are not a giveaway. The problem is, as a Spy, you need to walk right up behind someone to backstab them. Most allies don't get that close unless they're a Medic or running through you when they're a faster class than you.
One more related thing: teammates can tell their other teammates about suspicious looking players over voice chat. Unless it's an all-talk server, you have no idea they're doing this.
You should be more concerned over the noise of your cloaking devices. Cloaking devices make noise both when cloaking and uncloaking. The exception is The Dead Ringer, which doesn't make a cloaking sound. Basically, try to decloak somewhere where no one is around. Yes, this means you're relying more on your disguise than on your cloak.
If you use the Dead Ringer, disguise as a member of your own team until/unless you manage to get successfully behind enemy lines. I find friendly Pyro tends to work best, as it's the only class that has an excuse for not attacking the enemy as soon as they spot them. However, you're largely screwed if an enemy Pyro shows up.
sv_cheats
on single player you can turn the footsteps off (mp_footsteps 0
).