Letters of rec from a professor

A family friend of mine is a professor at my top university I want to attend and they are willing to give me a letter of rec. Is this even allowed? and if so how much will it help? Their area of study is extremely close to the one I’m applying to but not the exact same