I would agree that it is a general principle, but I would say that is applies universally—to both the needy and to enemies. Jesus' greater message calls us to extend love and compassion to all people, including the needy and our enemies. He is teaching an overall attitude of selflessness and generosity towards others, regardless of whether they are in need or are considered enemies.
Note that the subsequent verse (verse 43-44) introduces the specific command to love one's enemies. This creates a theme of radical love and compassion in Jesus' teachings.
Jesus teaches: (Mark 12:30-31)
The greatest commandment:
30 And you shall love the Lord your God with all your heart, with all
your soul, with all your mind, and with all your strength.’ This is
the first commandment. 31 And the second, like it, is this: ‘You shall
love your neighbor as yourself.’ There is no other commandment greater than these.”
Love Your Enemies (Luke 6:27-36)
27 “But I say to you who hear: Love your enemies, do good to those who
hate you, 28 bless those who curse you, and pray for those who
spitefully use you. 29 To him who strikes you on the one cheek, offer
the other also. And from him who takes away your cloak, do not
withhold your tunic either. 30 Give to everyone who asks of you. And
from him who takes away your goods do not ask them back. 31 And just
as you want men to do to you, you also do to them likewise.
32 “But if you love those who love you, what credit is that to you?
For even sinners love those who love them. 33 And if you do good to
those who do good to you, what credit is that to you? For even sinners
do the same. 34 And if you lend to those from whom you hope to receive
back, what credit is that to you? For even sinners lend to sinners to
receive as much back. 35 But love your enemies, do good, and lend,
hoping for nothing in return; and your reward will be great, and
you will be sons of the Most High. For He is kind to the unthankful
and evil. 36 Therefore be merciful, just as your Father also is
merciful.
The Apostle Paul teaches: (Romans 12:20-21)
20 Therefore
“If your enemy is hungry, feed him; If he is thirsty, give him a
drink; For in so doing you will heap coals of fire on his head.”
21 Do not be overcome by evil, but overcome evil with good.
1 Peter teaches: (1 Peter 3:9)
9 not returning evil for evil or reviling for reviling, but on the
contrary blessing, knowing that you were called to this, that you may
inherit a blessing.