I have a question about a specific case but it relates to a broad subject so I'm making the question less narrow.
Pesachim 101a presents a minhag they used to have to make Kiddush in synagogue. Even though one has to make Kiddush where they are eating (Orach Chaim 273:1), the gemarra says they would have guests eat and sleep in the synagogue. Today even though there aren't guests in the synagogue, in some places the practice continues (although some aren't happy with this practice, see Orach Chaim 269:1). While the Ran in Pesachim 19b says those that continue the practice hold it's a takanah that Chazal instituted, the Mishnah Berurah (OC 269 SK 5) understands that it's a minhag.
Consequently, a person who doesn't have such a minhag, seemingly if they would make Kiddush in shul it would be a bracha levatala (see Tosafos on 100b: והיכא דליכא אורחים סמוך לבהכ"נ אין לקדש דהויא ברכה לבטלה).
Now, there is a discussion about making a bracha on a minhag, I'm asking even if one would normally make a bracha on a minhag, what about where they don't have this minhag? If such a person, let's say is a guest at a synagogue where they do have such a minhag, if they ask him to make Kiddush would he be allowed? There is a concept of following minhag hamakom, but I'm wondering if it would allow making a bracha one otherwise wouldn't be allowed to make.
Edit: it seems my example of kiddush in synagogue isn't the best (either it's not a minhag but a takana, or even if it's a minhag it's not an individual's minhag but a congregation). Perhaps a better example is saying a bracha on hallel on Rosh Chodesh. Sefardim normally don't (OC 422:2) (although I wonder if that's dependant on making a bracha on a minhag...). What if a sefardi is asked to lead hallel at a synagogue that says the bracha? Can they? Should they?
Edit2: @DoubleAA confirmed my suspicion about Sefardim and Hallel being connected to saying a bracha on minhag. Per their advice, new scenario as an example for this question: An Ashkenazi who doesn't say Hallel on Rosh Chodesh being asked to lead Hallel at another synagogue. Can they say the bracha? Should they?