Yes, you could do this, however you should do a live install, instead of a full install. Live systems are designed to run from your computers RAM, and minimize the number of read/writes to the flash drive. This is important because flash drives have much more finite life spans than hard discs, and a full install, although possible, will burn the drive out quickly. It would also be very slow, trust me I tried it myself once...
You can use the Ubuntu startup disc creator, Unetbootin, or even the
dd command to create the live system. These methods will work on both sd cards and USB discs. Here are a couple resources to get to started: