Was the word 男朋友 borrowed from English (or maybe the opposite)?
Yes.

The English words boyfriend/girlfriend are modern; their usage to refer to romantic, unmarried relations dates to around 1922. This is also where other terms like "dating" arose.

Similarly, in Chinese, 男朋友/女朋友 do not exist in pre-modern times. Other terms like 佳人 would be used.

The Republican Era saw big changes in Chinese culture and adoption of Western culture and language. It would be easy to conclude, therefore, that the words 男朋友/女朋友 were borrowed from English during this time.