In general it is appreciated if you ask and also give your intentions i.e. left or right of track xx degrees for approx 40NM. Also do it well in advance, 20 miles or so. I will never refuse you to avoid Wx, but may level you off, if climbing or descending, for obvious reasons.
As for avoiding Wx into R, D or P airspace (active missile test range for example) a negative might be forthcoming: "If you avoid to the right you will die..." kinda thing, but an alternative will be suggested.