My question is: does ばかり, grammar-wise, have to take a copula?
In this position in a sentence, yes, the copula is required.
Historically, ~ばかり derives from a noun. I suspect that informs the grammar point that requires the copula after this. Looking at some quotes from older texts, where the preceding word is an inflecting word, the inflection used is the 連体形【れんたいけい】 or adnominal form, which is used to modify a following noun. (Note: The 連体形【れんたいけい】 and 終止形【しゅうしけい】 or terminal form have fused in modern Japanese, but there were still distinct endings for these in Classical Japanese and older forms of the language.)
Likewise, だけ also derives from a noun, and similar grammar applies -- 彼は帰っただけ[だ]{●}, where that copula is again needed.
See also this answer post about the derivation of ~ばかり.
Is ばかり somehow a noun? Or perhaps does ばかり turn the whole phrase before it into a noun?
Yes, and yes.
The first "yes" is answered further above: ばかり is derivationally a noun, and grammatically still behaves as one in some ways.
The second "yes" is due to the way that Japanese allows for various words and phrases to modify the word directly afterwards, without requiring any coordinating conjunction similar to English that: "the car that goes" can be rendered in Japanese as simply [行く]{いく}[車]{くるま} (literally "the goes car").
From this, let's take another look at your sample sentence.
- 彼は帰ったばかりだ。
- The topic is clearly 彼は. That's what we're talking about. Topics are the outermost context of the sentence. In some (many?) cases, as in this one, the topic is also the subject, even though there's no explicitly stated subject marked with the particle が.
- Then we have the past tense / completed verb 帰った.
- But then we immediately have that ばかり. The 帰った essentially modifies the ばかり, telling us more about what kind of ばかり that is.
- And since ばかり is (functionally) a noun, we then need that だ on the end to close the predicate.
Please comment if this does not address your question, and I can edit to update.