It's fine to mention canon characters, and to include your character's opinions on them, but actually being friends with them is a bit of a grey area. Having them *know* a canon char is fine; to use your example, Ethel Shufflebottom could have worn a "Support Cedric" badge and wished him luck while they were working on an essay in the library that they'd both been set, but having her actually date him probably wouldn't be approved. Same sort of thing goes for Dumbledore - with the added caveat that your character would have to have a good reason to converse with Dumbledore - think how little personal attention he paid to Ron and Hermione in the books, for example. Usually students would talk with their head of house if they needed support or an adult to talk to.
Mentioning how your character felt about others is fine, so long as it makes sense. So I could say that Pixie thinks Tori is a fun person, but not that she really admires her talent for upside-down origami whilst flying on a dragon (though lets be honest, Pixie would find that completely awesome xD). TBH I'd probably let the trio's drivers know that I was planning to mention them in a sheet even if there's no actual interaction, because lets face it, we all like to see anything our chars are mentioned in!
Assuming the character is an adult and has left school, saying he generally got on well with Hufflepuffs is fine. Just avoid saying "he got on with everyone in ** house", for example, because that would be touching on godmoding (and also might restrict things in the future, say if someone created a Hufflepuff who he wouldn't get on with and you wanted a plot where they'd always been enemies or something!)
Portraits...none of them are played, so I think it'd be fine to have your char talk with them. Especially if you invent portraits or paintings that aren't actually in the books. Ghosts it's the same as canons - so long as any of their interactions are IC (Fat Friar friendly, Grey lady aloof and distant etc) it should work.
I think I covered everything?
Carys x