Electro acoustic guitars with built-in pickups, almost always piezo, are extremely common; this one guitar shop lists over 1000 different types.
Electro-Acoustic Guitars | Gear4music
The sound difference to an electric guitar is due to it picking up mechanical vibration rather than from how the moving string influences the magnetic field over an electric guitar style pickup.
But; you can also get magnetic pickups for acoustic guitars, usually soundhole mounting - they just fit across the hole under the strings. They are quite popular.
And then such as this, in one in my collection, a Steinberger Synapse:
View media item 133
That's an under-bridge Piezo pickup, the exact same principle as in the Yamaha acoustic, so it works on the same mechanical vibration system, not magnetic - but it's an extra facility in some electric guitars, just with additional positions in the pickup selector switch. On that specific one, you can fade or mix between pickup types.
Buy Electric Guitars w/ Piezo Pickups + accessories online at Europe's largest music retailer - Fast shipping, 30 days money-back and 3 years Thomann guarantee
Plus of course there are Semi-acoustic guitars - electric guitars with partly hollow bodies like the classic ES-335
The point is that there is no sudden changeover "Acoustic vs Electric" - just about any sound is possible from any style of guitar, depending on the player and amplification / effects system it's used with.