-0.5*(A+B) is not a contrast, which is the seat of your puzzlement.
All you can get from y ~ x is an intercept (a column of ones) and a
single 'contrast' column for 'x'.
If you use y ~ 0+x you can get two columns for 'x', but R does not
give you an option of what columns in the case: see the source of
contrasts(). So you would need to replace contrasts(), which I think
will be hard as model.matrix.default will look in the 'stats'
namespace. It would probably be easier to create the model matrix
yourself.
Or accept the default and do the parameter transformations yourself.
l <- lm(y~x)
T <- rbind(
c(-1,-.5),
c(0,1))
c2 <- T%*%coef(l)
V2 <- T%*%vcov(l) %*% t(T)
cbind(coef=c(c2), s.e.=sqrt(diag(V2)))