suspect ... not sourcing current, they are sinking
Don't guess or go by heresay, READ THE DATASHEET. That will tell you outright how much current particular port pins can source.
Most likely, most port pins can source some current. It doesn't take much current to be amplified by a transistor to drive a LED, so even for a rather weak current source capability, the circuit you show should work.
We can even work backwards and find what the port has to source to turn on the LED fully. Let's say the up arrow goes to 5 V. The LED is red, so figure it drops 1.8 V or so. Account another 200 mV for the saturated transistor, and that leaves 3 V across the 2 kΩ resistor. That means the LED current is (3 V)/(2 kΩ) = 1.5 mA. Let's say the transistor can be counted on to have a gain of 50. That means 30 µA of base current would be needed to turn on the LED.
With the 5 kΩ resistor there, the circuit will actually draw 520 µA when the digital output is at 3.3 V. Most digital outputs can do that if they are set up to source current at all, but again, read the datasheet (do you see the recurring theme here?).
Your second schematic shows a motor, which likely needs much more current than the LED. A single transistor may not have enough gain to take the small digital output source current and allow enough current to drive the motor with. There are various options to deal with this, like using a low-voltage FET, or a second bipolar transistor. However, that would be the topic of a different question.
Here is a way to use low state current sink capability of a digital output instead of its high state current source capability. This also shows how to use two transistors to get lots of current amplification to be able to drive higher current loads:
In this example, the digital output only has to sink about a milliamp. When the digital output goes low, it drives about 1 mA thru the base of Q1. With the part values shown, that drives about 24 mA thru the base of Q2. This means Q1 needs to have a gain of at least 24, which is easily found in many small signal PNP transistors. The gain of Q2 allows it to switch load currents up to around 700 mA, which is enough to drive small motors.
Note also that the load doesn't have to be powered from the 3.3 V supply. The TIP41 transistor shown can handle up to 40 V. If the load is even partially inductive, there should be a reverse diode across it to give the inductive kickback current a path to flow that doesn't require frying the transistor.