I would rule no. A reaction occurs in response to a trigger. The trigger, in this case, is your character being attacked. With spells like shield the character enacts a preventative measure in response to the trigger. While having a sword and shield equipped, you cannot perform the somatic components necessary to use the shield spell.
Now, you might be asking me why you can't just drop your sword and then cast shield? There are a couple of reasons why you can't do that.
First, for every round of combat you have 1 reaction. If you use your reaction, you cannot use another reaction until the start of your next turn. Dropping your sword in response to an enemy attack and casting the shield spell should count as two reactions. You do not possess two reactions.
Second, keep in mind that combat in 5e generally occurs over the course of a minute. A minute in 5e roughly translates to 10 rounds in combat. This is important to note because in cases like this, or in the event that a spellcaster is concentrating on a spell with a minute duration, you need to count down if combat has gone on for more than 10 rounds.
What we can glean from this information is that a round translates to 1/10 of a minute which equals six seconds. I wasn't a math major in college but I believe your individual turn takes place in 0.6 seconds (mechanically). In this time frame, you get your movement, your action, and possibly a bonus action. Your reaction occurs at some point during the six seconds that makes up the round. You do not have time to drop your weapon and recite the verbal components as well as perform the somatic components for the shield spell in that short time interval.
Third, what you're trying to do is the entire reason that war caster is so important to take as an eldritch knight. It was practically made for the sub class. If you want to cast spells and hold onto your weapons, you should take the feat. Seriously, as an eldritch knight who has played in a campaign for about a year now, from level 1 to level 11, I swear by it.
Warcaster is damn near mandatory if you don't want to have to choose (and its not much of a choice for an EK) between spell casting and martial fighting at any given moment. You also get advantage on con saves as well as single target spell opportunity attacks. "You just moved 10 feet from me, Hold Person!"