shooting .22lr in a .223/5.56 barrel won't damage it. it can cause leading. which means that extra care must be taken cleaning it (getting the lead out is more than just an expression).
Something to keep in mind is that .22lr bullets are shorter/lighter than 5.56x45 bullets, so the .22 does best with slower twist rates like 1:14 or 1:12.
If you want to build a dual use gun I'd suggest going with a 1:12 pencil barrel, cheap upper and BCG and a PCF lower. You'd end up with a very pleasant lightweight AR for under $500 that you could shoot cheap common 55 gr ammo though and once you spend the $200 or so for CIENER kit you can shoot .22 lr ammo through it too. If you look for used parts you can do it even cheaper.